Location: PHPKode > scripts > DLog > dlog/dlog_test.php
<html>
<body>
<h1>DLog Test</h1>
<?php

require_once('dlog.php');
/**
 * Module with mssql support
 * require_once('dlog_mssql.php');
 */
 
$log=new dlog();

// Call the log function directly.
// First case, log an user info without any error
$log->Log(DLOG_USER_INFO,'Info 1',__FILE__,__LINE__);
// Some error logging
$log->Log(E_USER_NOTICE,'Test 1',__FILE__,__LINE__);
$log->Log(E_USER_WARNING,'Test 2',__FILE__,__LINE__);

// Optionally I may set my log function as error handler.
$log->register_error_handler();
// and then rise an error to see my class in action
trigger_error('Only a test',E_USER_NOTICE);
?>
</body>
</html>


Return current item: DLog