| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | class LogListener implements EventSubscriberInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var LoggerInterface |
||
| 27 | */ |
||
| 28 | private $logger; |
||
| 29 | |||
| 30 | 1 | public function __construct(LoggerInterface $logger) |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | */ |
||
| 38 | 1 | public static function getSubscribedEvents(): array |
|
| 43 | ]; |
||
| 44 | } |
||
| 45 | |||
| 46 | 1 | public function onProxyUnreachableError(Event $event) |
|
| 47 | { |
||
| 48 | 1 | $this->log(LogLevel::CRITICAL, $event->getException()); |
|
| 49 | 1 | } |
|
| 50 | |||
| 51 | 1 | public function onProxyResponseError(Event $event) |
|
| 54 | 1 | } |
|
| 55 | |||
| 56 | 1 | private function log($level, \Exception $exception) |
|
| 63 | 1 | } |
|
| 64 | } |
||
| 65 |