ExceptionLoggingSubscriber::on403

public ExceptionLoggingSubscriber::on403(GetResponseForExceptionEvent $event)

Log 403 errors.

Parameters

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

File

core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php, line 40

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()]);
}
doc_Drupal
2016-10-29 09:09:23
Comments
Leave a Comment

Please login to continue.