8000 [HttpKernel][DX] Allow the log level of http exceptions to be overridden by mtibben · Pull Request #25533 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel][DX] Allow the log level of http exceptions to be overridden #25533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
Prev Previous commit
Next Next commit
Log http 4xx as warning
  • Loading branch information
mtibben committed Jan 19, 2018
commit c1d0dea35f9f2085a941de014f4f67baef2c66d0
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ protected function getExceptionLogLevel(\Exception $exception): string
$statusCode = $exception->getStatusCode();
if (isset($this->httpStatusCodeLogLevel[$statusCode])) {
$logLevel = $this->httpStatusCodeLogLevel[$statusCode];
} elseif ($statusCode < 500) {
$logLevel = LogLevel::ERROR;
} elseif (400 <= $statusCode && $statusCode < 500) {
$logLevel = LogLevel::WARNING;
}
}

Expand Down
0