Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
63 | private function allocateLogger(string $channel): LoggerInterface |
||
64 | { |
||
65 | $container = ContainerScope::getContainer(); |
||
66 | if (empty($container) || !$container->has(LogsInterface::class)) { |
||
67 | return $this->logger ?? new NullLogger(); |
||
68 | } |
||
69 | |||
70 | //We are using class name as log channel (name) by default |
||
71 | return $container->get(LogsInterface::class)->getLogger($channel); |
||
72 | } |
||
74 |