trace mode for debug

This commit is contained in:
Diego Najar 2018-12-26 20:43:20 +01:00
parent 52587968ca
commit 9eb5d583b6
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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));
}
}
}