public function log(\Exception $exception)
    {
        $logData  = date('Y-m-d H:i:s');
        $logData .= $this->exceptionFields($exception);
        $logData .= $this->fieldsForPrevious($exception->getPrevious());
        error_log(
                $logData . "\n",
                3,
                $this->getLogDir() . DIRECTORY_SEPARATOR . 'exceptions-' . date('Y-m-d') . '.log'
        );
    }