LogErrorEventListener

Class
Read only: Yes Final: Yes

Log dispatcher error events through a PSR-3 logger.

Description

The logged context includes both the throwable and the emitted ErrorEvent.

Table of Contents

Properties

 : LoggerInterface

Methods

__construct()

Create a listener that records dispatcher failures.

 : mixed
__invoke()

Log the throwable carried by the provided error event.

 : void
Properties
Methods

__construct()

Public

Create a listener that records dispatcher failures.

public __construct(LoggerInterface  $logger) : mixed
Parameters
$logger : LoggerInterface

Description

logger used to record error events

__invoke()

Public

Log the throwable carried by the provided error event.

public __invoke(ErrorEvent  $event) : void
Parameters
$event : ErrorEvent

Description

error event emitted by the dispatcher