|
@@ -70,9 +70,13 @@ class ExceptionListener
|
|
|
try {
|
|
|
$response = $event->getSubject()->handle($request, HttpKernelInterface::SUB_REQUEST, true);
|
|
|
|
|
|
- error_log(sprintf('%s: %s', get_class($exception), $exception->getMessage()));
|
|
|
+ if (null !== $this->logger) {
|
|
|
+ $this->logger->err(sprintf('%s: %s', get_class($exception), $exception->getMessage()));
|
|
|
+ }
|
|
|
} catch (\Exception $e) {
|
|
|
- error_log(sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()));
|
|
|
+ if (null !== $this->logger) {
|
|
|
+ $this->logger->err(sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()));
|
|
|
+ }
|
|
|
|
|
|
return false;
|
|
|
}
|