protected function getFileExceptionHandler($file)
    {
        $format = '%context.stacktrace%'.PHP_EOL;

        $handler = new StreamHandler($file, Logger::ERROR);
        $handler->setFormatter(new ExceptionLineFormatter($format));

        return $handler;
    }