1 | <?php |
||
23 | class LogListener implements EventSubscriberInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var LoggerInterface |
||
27 | */ |
||
28 | private $logger; |
||
29 | |||
30 | 1 | public function __construct(LoggerInterface $logger) |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 1 | public static function getSubscribedEvents() |
|
39 | { |
||
40 | return [ |
||
41 | 1 | Events::PROXY_UNREACHABLE_ERROR => 'onProxyUnreachableError', |
|
42 | 1 | Events::PROXY_RESPONSE_ERROR => 'onProxyResponseError', |
|
43 | 1 | ]; |
|
44 | } |
||
45 | |||
46 | 1 | public function onProxyUnreachableError(Event $event) |
|
50 | |||
51 | 1 | public function onProxyResponseError(Event $event) |
|
55 | |||
56 | 1 | private function log($level, \Exception $exception) |
|
64 | } |
||
65 |