
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.