appdb/include error_log.php

WineHQ wineowner at wine.codeweavers.com
Wed Jul 19 22:50:47 CDT 2006


ChangeSet ID:	26670
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2006/07/19 22:50:47

Modified files:
	include        : error_log.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	Add logBackTrace() call to error_log class so we can determine code flow during error logging

Patch: http://cvs.winehq.org/patch.py?id=26670

Old revision  New revision  Changes     Path
 1.1           1.2           +11 -0      appdb/include/error_log.php

Index: appdb/include/error_log.php
diff -u -p appdb/include/error_log.php:1.1 appdb/include/error_log.php:1.2
--- appdb/include/error_log.php:1.1	20 Jul 2006  3:50:47 -0000
+++ appdb/include/error_log.php	20 Jul 2006  3:50:47 -0000
@@ -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'";



More information about the wine-cvs mailing list