From 436e2707105c59fd9926c5e4d7e2850882ea13d8 Mon Sep 17 00:00:00 2001 From: Abel Date: Mon, 21 Jan 2019 15:46:30 +0100 Subject: [PATCH] Implemented Exception messages in FuzeWorks HTTP Layout for Logger --- src/Layout/layout.logger_http.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Layout/layout.logger_http.php b/src/Layout/layout.logger_http.php index 960b648..ae5b14f 100644 --- a/src/Layout/layout.logger_http.php +++ b/src/Layout/layout.logger_http.php @@ -47,6 +47,9 @@ foreach ($logs as $log) { } elseif ($log['type'] == 'ERROR') { $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) && is_string($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . ' ' . (!empty($log['logFile']) ? $log['logFile'] : '') . ' : ' . (!empty($log['logLine']) ? $log['logLine'] : '') . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; + } elseif ($log['type'] == 'EXCEPTION') { + $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) && is_string($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . ' + ' . (!empty($log['logFile']) ? $log['logFile'] : '') . ' : ' . (!empty($log['logLine']) ? $log['logLine'] : '') . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; } elseif ($log['type'] == 'WARNING') { $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) && is_string($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . ' ' . (!empty($log['logFile']) ? $log['logFile'] : '') . ' : ' . (!empty($log['logLine']) ? $log['logLine'] : '') . '(' . round($log['runtime'] * 1000, 4) . ' ms)
';