src/main/php/environments/ExceptionLogger.php
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'
        );
    }
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'
        );
    }
logs the exception into a logfile

@param  \Exception  $exception  exception to log