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
Fix code style
  • Loading branch information
mtibben committed Jan 19, 2018
commit 06bb76aa5b329b444f28b8043788854bb6782f2e
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 @@ -33,7 +33,7 @@ class ExceptionListener implements EventSubscriberInterface
{
protected $controller;
protected $logger;
protected $httpStatusCodeLogLevel = [];
protected $httpStatusCodeLogLevel = array();

public function __construct($controller, LoggerInterface $logger = null)
{
Expand Down Expand Up @@ -103,7 +103,7 @@ protected function getExceptionLogLevel(\Exception $exception)
$statusCode = $exception->getStatusCode();
if (isset($this->httpStatusCodeLogLevel[$statusCode])) {
$logLevel = $this->httpStatusCodeLogLevel[$statusCode];
} else if ($statusCode < 500) {
} elseif ($statusCode < 500) {
$logLevel = LogLevel::ERROR;
}
}
Expand Down
0