From 34594b6eb4bd5849a83bc1db238ec7331fec09da Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Thu, 20 Jul 2006 03:50:47 +0000 Subject: [PATCH] Add logBackTrace() call to error_log class so we can determine code flow during error logging --- include/error_log.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/error_log.php b/include/error_log.php index 6ddd4c7..640cc05 100644 --- a/include/error_log.php +++ b/include/error_log.php @@ -31,6 +31,17 @@ class error_log '0'); } + /* get a backtrace and log it to the database */ + function logBackTrace($sDescription) + { + ob_start(); + print_r(debug_backtrace()); + $sDebugOutput = ob_get_contents(); + ob_end_clean(); + + error_log::log_error("general_error", $sDescription.' '.$sDebugOutput); + } + function getEntryCount() { $sQuery = "SELECT count(*) as cnt FROM error_log WHERE deleted = '0'";