exceptionHandler = $exceptionHandler; parent::__construct($filesystem, $filePath); } /** * Writes formatted record through the handler. * * @param array $record The record metadata * @return void */ public function write(array $record) { if (isset($record['context']['exception'])) { $this->exceptionHandler->handle($record); return; } $record['formatted'] = $this->getFormatter()->format($record); parent::write($record); } }