From a027b0c73435a7fd0c8c7ce76883c559d6db3df4 Mon Sep 17 00:00:00 2001 From: Sergey Shlokov Date: Wed, 11 Jan 2017 19:05:01 +0300 Subject: [PATCH] Wrap the output of the error log message To be able to customize the HTML block of error messages if it's displayed on the site page when the log target is 'HTML'. --- src/xPDO/xPDO.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xPDO/xPDO.php b/src/xPDO/xPDO.php index 462f264e..606ff49b 100644 --- a/src/xPDO/xPDO.php +++ b/src/xPDO/xPDO.php @@ -2030,7 +2030,8 @@ protected function _log($level, $msg, $target= '', $def= '', $file= '', $line= ' } switch ($target) { case 'HTML' : - echo '
[' . strftime('%Y-%m-%d %H:%M:%S') . '] (' . $this->_getLogLevel($level) . $def . $file . $line . ')
' . $msg . '
' . "\n"; + $debugBlockClass = $this->getOption('debug_block_class',NULL,'modx-debug-block'); + echo '
'.'
[' . strftime('%Y-%m-%d %H:%M:%S') . '] (' . $this->_getLogLevel($level) . $def . $file . $line . ')
' . $msg . '
' . "\n"; break; default : echo '[' . strftime('%Y-%m-%d %H:%M:%S') . '] (' . $this->_getLogLevel($level) . $def . $file . $line . ') ' . $msg . "\n";