src/Log.php
public static function exception($title, PhpException $e)
    {
        $exceptionMessage = (string) $e->getMessage();

        $content = (string) $title . PHP_EOL . 'Exception of type \'' . get_class($e) . '\': ' . $exceptionMessage;

        // need to add check if the log verbosity is info or debug. Look at old code
        self::$logger->exception(new PhpException($content, null, $e));

        return true;
    }
public static function exception($title, PhpException $e)
    {
        $exceptionMessage = (string) $e->getMessage();

        $content = (string) $title . PHP_EOL . 'Exception of type \'' . get_class($e) . '\': ' . $exceptionMessage;

        // need to add check if the log verbosity is info or debug. Look at old code
        self::$logger->exception(new PhpException($content, null, $e));

        return true;
    }
public static function exception ( $ title , PhpException $ e ) { $ exceptionMessage = ( string ) $ e -> getMessage ( ) ; $ content = ( string ) $ title . PHP_EOL . 'Exception of type \'' . get_class ( $ e ) . '\': ' . $ exceptionMessage ; // need to add check if the log verbosity is info or debug. Look at old code self :: $ logger -> exception ( new PhpException ( $ content , null , $ e ) ) ; return true ; }
Save an exception as an error in the log file.

@param string       $title
@param PhpException $e

@return bool
@throws \Zend\Log\Exception\InvalidArgumentException
@throws \Zend\Log\Exception\RuntimeException
Save an exception as an error in the log file .