protected function ExceptionListener::logException in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/EventListener/ExceptionListener.php \Symfony\Component\HttpKernel\EventListener\ExceptionListener::logException()
Logs an exception.
Parameters
\Exception $exception The \Exception instance:
string $message The error message to log:
1 call to ExceptionListener::logException()
- ExceptionListener::onKernelException in vendor/
symfony/ http-kernel/ EventListener/ ExceptionListener.php
File
- vendor/
symfony/ http-kernel/ EventListener/ ExceptionListener.php, line 85
Class
- ExceptionListener
- ExceptionListener.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
protected function logException(\Exception $exception, $message) {
if (null !== $this->logger) {
if (!$exception instanceof HttpExceptionInterface || $exception
->getStatusCode() >= 500) {
$this->logger
->critical($message, array(
'exception' => $exception,
));
}
else {
$this->logger
->error($message, array(
'exception' => $exception,
));
}
}
}