소스 검색

ControllerNotFound: Changed log level from info to error. Also moved
throw exception code block up, to prevent the message from beeing
logged multiple times.

Kai 14 년 전
부모
커밋
529381b378
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php

+ 6 - 6
src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php

@@ -76,16 +76,16 @@ class ControllerNameParser
 
     private function handleControllerNotFoundException($bundle, $controller, array $logs)
     {
-        if (null !== $this->logger) {
-            foreach ($logs as $log) {
-                $this->logger->info($log);
-            }
-        }
-
         // just one log, return it as the exception
         if (1 == count($logs)) {
             throw new \InvalidArgumentException($logs[0]);
         }
+        
+        if (null !== $this->logger) {
+            foreach ($logs as $log) {
+                $this->logger->error($log);
+            }
+        }
 
         // many logs, use a message that mentions each searched bundle
         $names = array();