1 | <?php |
||
11 | trait LoggerTrait |
||
12 | { |
||
13 | |||
14 | use \Psr\Log\LoggerTrait; |
||
15 | |||
16 | /** |
||
17 | * @var Logger |
||
18 | */ |
||
19 | private $logger; |
||
20 | |||
21 | /** |
||
22 | * @Inject("@logger") |
||
23 | * @param Logger $logger |
||
24 | */ |
||
25 | 5 | public function setLogger(Logger $logger) |
|
29 | |||
30 | /** |
||
31 | * Logs with an arbitrary level. |
||
32 | * |
||
33 | * @param mixed $level |
||
34 | * @param string $message |
||
35 | * @param array $context |
||
36 | */ |
||
37 | 3 | public function log($level, $message, array $context = []) |
|
41 | } |
||
42 |