From: Roland Häder Date: Fri, 3 Mar 2023 08:06:21 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ac08f033560c6f74c8b2ecb7590d250e0234a95;p=core.git Continued: - moved logging level to wrong --- diff --git a/framework/main/middleware/debug/class_DebugMiddleware.php b/framework/main/middleware/debug/class_DebugMiddleware.php index c83389f0..53a2ece6 100644 --- a/framework/main/middleware/debug/class_DebugMiddleware.php +++ b/framework/main/middleware/debug/class_DebugMiddleware.php @@ -132,31 +132,31 @@ class DebugMiddleware extends BaseMiddleware implements Registerable, Logger { if (isset($backtrace[4]) && $backtrace[3]['function'] == 'partialStub') { // Prepend class::function:line from 2nd element //* NOISY-DEBUG: */ printf('[%s:%d]: partialStub() was invoked ...' . PHP_EOL, __METHOD__, __LINE__); - $message = sprintf('[%s::%s:%d]: [%s] %s', + $message = sprintf('[%s] [%s::%s:%d]: %s', + $logLevel, $backtrace[4]['class'], $backtrace[4]['function'], (isset($backtrace[4]['line']) ? $backtrace[4]['line'] : '0'), - $logLevel, $message ); } elseif (isset($backtrace[3]) && $backtrace[2]['function'] == 'debugOutput') { // Prepend class::function:line from 2nd element //* NOISY-DEBUG: */ printf('[%s:%d]: debugOutput() was invoked ...' . PHP_EOL, __METHOD__, __LINE__); - $message = sprintf('[%s::%s:%d]: [%s] %s', + $message = sprintf('[%s] [%s::%s:%d]: %s', + $logLevel, $backtrace[3]['class'], $backtrace[3]['function'], (isset($backtrace[3]['line']) ? $backtrace[3]['line'] : '0'), - $logLevel, $message ); } else { // Prepend class::function:line from 2nd element //* NOISY-DEBUG: */ printf('[%s:%d]: Ordinary invocation ...' . PHP_EOL, __METHOD__, __LINE__); - $message = sprintf('[%s::%s:%d]: [%s] %s', + $message = sprintf('[%s] [%s::%s:%d]: %s', + $logLevel, $backtrace[2]['class'], $backtrace[2]['function'], (isset($backtrace[2]['line']) ? $backtrace[2]['line'] : '0'), - $logLevel, $message ); }