Skip to content

LogErrorEventListener

github-actions edited this page Apr 6, 2026 · 1 revision

Log dispatcher error events through a PSR-3 logger.

The logged context includes both the throwable and the emitted

  • See: \FastForward\EventDispatcher\Event\ErrorEvent.

  • Full name: \FastForward\EventDispatcher\Listener\LogErrorEventListener
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Create a listener that records dispatcher failures.

public __construct(\Psr\Log\LoggerInterface $logger): mixed

Parameters:

Parameter Type Description
$logger \Psr\Log\LoggerInterface logger used to record error events

__invoke

Log the throwable carried by the provided error event.

public __invoke(\FastForward\EventDispatcher\Event\ErrorEvent $event): void

Parameters:

Parameter Type Description
$event \FastForward\EventDispatcher\Event\ErrorEvent error event emitted by the dispatcher

Clone this wiki locally