Skip to content
Browse files

ErrorPresenter: logging 4xx errors

  • Loading branch information...
1 parent 796543d commit 351f2d7046d6f677eaaee57d41555f82bccea1e7 @dg dg committed Dec 13, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/presenters/ErrorPresenter.php
View
1 app/presenters/ErrorPresenter.php
@@ -27,6 +27,7 @@ public function renderDefault($exception)
} elseif ($exception instanceof NA\BadRequestException) {
$code = $exception->getCode();
$this->setView(in_array($code, array(403, 404, 405, 410, 500)) ? $code : '4xx'); // load template 403.latte or 404.latte or ... 4xx.latte
+ Debugger::log("HTTP code $code", 'access'); // log to access.log
} else {
$this->setView('500'); // load template 500.latte

0 comments on commit 351f2d7

Please sign in to comment.
Something went wrong with that request. Please try again.