Phprest\ErrorHandler\Handler\Log::buildLogMessage PHP Method

buildLogMessage() protected method

protected buildLogMessage ( Exception $exception ) : string
$exception Exception
return string
    protected function buildLogMessage(\Exception $exception)
    {
        $message = $exception->getMessage() . "({$exception->getCode()})";
        if ($exception instanceof PhprestException && $exception->getDetails()) {
            $message .= ' Details :: ' . json_encode($exception->getDetails());
        }
        $message .= ' Stack trace :: ' . $exception->getTraceAsString();
        return $message;
    }