class ExceptionLoggingSubscriber implements EventSubscriberInterface (View source)

Log exceptions without further handling.

Properties

protected LoggerChannelFactoryInterface $logger

The logger channel factory.

Methods

__construct(LoggerChannelFactoryInterface $logger)

Constructs a new ExceptionLoggingSubscriber.

on403(ExceptionEvent $event)

Log 403 errors.

on404(ExceptionEvent $event)

Log 404 errors.

onError(ExceptionEvent $event)

Log not-otherwise-specified errors, including HTTP 500.

onException(ExceptionEvent $event)

Log all exceptions.

static 
getSubscribedEvents()

{@inheritdoc}

Details

__construct(LoggerChannelFactoryInterface $logger)

Constructs a new ExceptionLoggingSubscriber.

Parameters

LoggerChannelFactoryInterface $logger

The logger channel factory.

on403(ExceptionEvent $event)

Log 403 errors.

Parameters

ExceptionEvent $event

The event to process.

on404(ExceptionEvent $event)

Log 404 errors.

Parameters

ExceptionEvent $event

The event to process.

onError(ExceptionEvent $event)

Log not-otherwise-specified errors, including HTTP 500.

Parameters

ExceptionEvent $event

The event to process.

onException(ExceptionEvent $event)

Log all exceptions.

Parameters

ExceptionEvent $event

The event to process.

static getSubscribedEvents()

{@inheritdoc}