[FrameworkBundle] changed error_log() calls to logger calls
This commit is contained in:
parent
0da7295a9c
commit
917da00763
@ -70,9 +70,13 @@ class ExceptionListener
|
|||||||
try {
|
try {
|
||||||
$response = $event->getSubject()->handle($request, HttpKernelInterface::SUB_REQUEST, true);
|
$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) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user