|
|
 Tyler | 2010-10-28 12:40:54 |
| I will never resort to outputting debug messages via the Webbrowser with print() or echo(), this class makes it very easy to write debug messages straight to the data system and follow what is happening in your code! |
 Yongchen Xu | 2010-10-28 21:50:40 - In reply to message 1 from Tyler |
| How to do it in detail? |
 Tyler | 2010-11-02 12:27:51 - In reply to message 2 from Yongchen Xu |
very easy:
you include the class and create the object:
include_once(dirname(__FILE__).'/../classes/debug_logging.class.php');
GLOBALS["DBG"] = new Debug_Logging(true, 'some filename', false);
then use the logging calls in your code:
$GLOBALS["DBG"]->info("Test message of the type DEBUG");
$GLOBALS["DBG"]->debug("Test message of the type DEBUG");
$GLOBALS["DBG"]->debug2("Test message of the type DEBUG2");
$GLOBALS["DBG"]->debug_array("Test message of the type DEBUG_ARRAY", $an_array);
$GLOBALS["DBG"]->debug2_array("Test message of the type DEBUG2_ARRAY", $an_array);
For further information take a look at the "test/01_test_debug_loggind.class.php" file. |
|