TYPO3  7.6
LoggerTrait.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Psr\Log;
4 
13 trait LoggerTrait
14 {
23  public function emergency($message, array $context = array())
24  {
25  $this->log(LogLevel::EMERGENCY, $message, $context);
26  }
27 
39  public function alert($message, array $context = array())
40  {
41  $this->log(LogLevel::ALERT, $message, $context);
42  }
43 
54  public function critical($message, array $context = array())
55  {
56  $this->log(LogLevel::CRITICAL, $message, $context);
57  }
58 
68  public function error($message, array $context = array())
69  {
70  $this->log(LogLevel::ERROR, $message, $context);
71  }
72 
84  public function warning($message, array $context = array())
85  {
86  $this->log(LogLevel::WARNING, $message, $context);
87  }
88 
97  public function notice($message, array $context = array())
98  {
99  $this->log(LogLevel::NOTICE, $message, $context);
100  }
101 
112  public function info($message, array $context = array())
113  {
114  $this->log(LogLevel::INFO, $message, $context);
115  }
116 
125  public function debug($message, array $context = array())
126  {
127  $this->log(LogLevel::DEBUG, $message, $context);
128  }
129 
139  abstract public function log($level, $message, array $context = array());
140 }