| 1 | <?php |
||
| 9 | trait LoggerTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * |
||
| 13 | * @var LoggerInterface |
||
| 14 | */ |
||
| 15 | protected $logger; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * |
||
| 19 | * @return LoggerInterface |
||
| 20 | */ |
||
| 21 | protected function getLogger() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * |
||
| 32 | * @param string $message |
||
| 33 | * @param array $context |
||
| 34 | */ |
||
| 35 | public function log($message, $context = [], $level = LogLevel::DEBUG) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * |
||
| 42 | * @param string $message |
||
| 43 | * @param array $context |
||
| 44 | */ |
||
| 45 | public function debug($message, $context = []) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * |
||
| 52 | * @param string $message |
||
| 53 | * @param array $context |
||
| 54 | */ |
||
| 55 | public function info($message, $context = []) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * |
||
| 62 | * @param string $message |
||
| 63 | * @param array $context |
||
| 64 | */ |
||
| 65 | public function warning($message, $context = []) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * |
||
| 72 | * @param string $message |
||
| 73 | * @param array $context |
||
| 74 | */ |
||
| 75 | public function error($message, $context = []) |
||
| 79 | } |
||
| 80 |