1 | <?php |
||
18 | class SfKernelEventLogger implements EventSubscriberInterface |
||
19 | { |
||
20 | /** @var Logger */ |
||
21 | private $logger; |
||
22 | |||
23 | /** |
||
24 | * @param Logger $logger |
||
25 | * @throws \Exception |
||
26 | */ |
||
27 | 4 | public function __construct(Logger $logger) |
|
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | 1 | public static function getSubscribedEvents() |
|
42 | |||
43 | /** |
||
44 | * @param GetResponseEvent $event |
||
45 | */ |
||
46 | 2 | public function onKernelRequest(GetResponseEvent $event) |
|
60 | |||
61 | /** |
||
62 | * @param GetResponseForExceptionEvent $event |
||
63 | */ |
||
64 | 1 | public function onKernelException(GetResponseForExceptionEvent $event) |
|
74 | |||
75 | /** |
||
76 | * @param string $message |
||
77 | * @param array $context |
||
78 | * @param int $level |
||
79 | */ |
||
80 | 3 | private function log($message, array $context = array(), $level = Logger::DEBUG) |
|
91 | } |
||
92 |