You are here

public function ExceptionLoggingSubscriber::on403 in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber::on403()

Log 403 errors.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process.

File

core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php, line 45
Contains \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber.

Class

ExceptionLoggingSubscriber
Log exceptions without further handling.

Namespace

Drupal\Core\EventSubscriber

Code

public function on403(GetResponseForExceptionEvent $event) {
  $request = $event
    ->getRequest();
  $this->logger
    ->get('access denied')
    ->warning('@uri', [
    '@uri' => $request
      ->getRequestUri(),
  ]);
}