From 9eb5d583b673b9d92ddfffd7d2841550e717c11a Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 26 Dec 2018 20:43:20 +0100 Subject: [PATCH] trace mode for debug --- bl-kernel/boot/init.php | 1 + bl-kernel/helpers/log.class.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 5ca54db6..30566cd6 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -9,6 +9,7 @@ define('BLUDIT_BUILD', '201811201'); // Debug mode // Change to FALSE, for prevent warning or errors on browser define('DEBUG_MODE', TRUE); +define('DEBUG_TYPE', 'TRACE'); // INFO, TRACE error_reporting(0); // Turn off all error reporting if (DEBUG_MODE) { // Turn on all error reporting diff --git a/bl-kernel/helpers/log.class.php b/bl-kernel/helpers/log.class.php index 3dfe5c48..f7f3b5c6 100644 --- a/bl-kernel/helpers/log.class.php +++ b/bl-kernel/helpers/log.class.php @@ -19,6 +19,10 @@ class Log { error_log('------------------------', $messageType); } error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType); + + if (DEBUG_TYPE=='TRACE') { + error_log(print_r(debug_backtrace(), true)); + } } }