ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
LoggerTrait.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Psr\Log;
4 
13 trait LoggerTrait
14 {
22  public function emergency($message, array $context = array())
23  {
24  $this->log(LogLevel::EMERGENCY, $message, $context);
25  }
26 
37  public function alert($message, array $context = array())
38  {
39  $this->log(LogLevel::ALERT, $message, $context);
40  }
41 
51  public function critical($message, array $context = array())
52  {
53  $this->log(LogLevel::CRITICAL, $message, $context);
54  }
55 
64  public function error($message, array $context = array())
65  {
66  $this->log(LogLevel::ERROR, $message, $context);
67  }
68 
79  public function warning($message, array $context = array())
80  {
81  $this->log(LogLevel::WARNING, $message, $context);
82  }
83 
91  public function notice($message, array $context = array())
92  {
93  $this->log(LogLevel::NOTICE, $message, $context);
94  }
95 
105  public function info($message, array $context = array())
106  {
107  $this->log(LogLevel::INFO, $message, $context);
108  }
109 
117  public function debug($message, array $context = array())
118  {
119  $this->log(LogLevel::DEBUG, $message, $context);
120  }
121 
130  abstract public function log($level, $message, array $context = array());
131 }
trait LoggerTrait
This is a simple Logger trait that classes unable to extend AbstractLogger (because they extend anoth...
Definition: LoggerTrait.php:14