getFile(), $message->getLine(), $message->getMessage(), self::$debugBacktraceForTests ? : $message->getTraceAsString()); $message = $log->formatMessage($level, $tag, $datetime, $message); } } public static function formatScreenMessage(&$message, $level, $tag, $datetime, $log) { if ($message instanceof \Exception) { Common::sendHeader('Content-Type: text/html; charset=utf-8'); $outputFormat = strtolower(Common::getRequestVar('format', 'html', 'string')); $response = new ResponseBuilder($outputFormat); $message = $response->getResponseException(new \Exception($message->getMessage())); } } public static function logException(\Exception $exception) { Log::error($exception); } }