Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 03c4340

Browse files
committed
do not log unmatched routes as an error
1 parent b849039 commit 03c4340

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Routing/ChainRouter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public function match($url)
8989
return $router->match($url);
9090
} catch (ResourceNotFoundException $e) {
9191
if ($this->logger) {
92-
$this->logger->addError($e);
92+
$this->logger->addInfo($e->getMessage());
9393
}
9494
// Needs special care
9595
} catch (MethodNotAllowedException $e) {
9696
if ($this->logger) {
97-
$this->logger->addError($e);
97+
$this->logger->addInfo($e->getMessage());
9898
}
9999
$methodNotAllowed = $e;
100100
}
@@ -120,7 +120,7 @@ public function generate($name, $parameters = array(), $absolute = false)
120120
return $router->generate($name, $parameters, $absolute);
121121
} catch (RouteNotFoundException $e) {
122122
if ($this->logger) {
123-
$this->logger->addError($e);
123+
$this->logger->addInfo($e->getMessage());
124124
}
125125
}
126126
}

0 commit comments

Comments
 (0)