ExceptionLoggingSubscriber::on404

public ExceptionLoggingSubscriber::on404(GetResponseForExceptionEvent $event)

Log 404 errors.

Parameters

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

File

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

Class

ExceptionLoggingSubscriber
Log exceptions without further handling.

Namespace

Drupal\Core\EventSubscriber

Code

public function on404(GetResponseForExceptionEvent $event) {
  $request = $event->getRequest();
  $this->logger->get('page not found')->warning('@uri', ['@uri' => $request->getRequestUri()]);
}
doc_Drupal
2016-10-29 09:09:23
Comments
Leave a Comment

Please login to continue.