소스 검색

[FrameworkBundle] added error logging with error_log() when logger is disabled

Fabien Potencier 15 년 전
부모
커밋
cbdde58ddd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/Symfony/Bundle/FrameworkBundle/Debug/ExceptionListener.php

+ 2 - 0
src/Symfony/Bundle/FrameworkBundle/Debug/ExceptionListener.php

@@ -55,6 +55,8 @@ class ExceptionListener
 
         if (null !== $this->logger) {
             $this->logger->err(sprintf('%s: %s (uncaught exception)', get_class($exception), $exception->getMessage()));
+        } else {
+            error_log(sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine()));
         }
 
         $class = $this->container->getParameter('exception_manager.class');