Beispiel #1
0
<?php

chdir('../');
require 'errorlog.php';
$config = array('writers' => array('syslog' => array('formatter' => array('ALL' => "%timestamp% %errorName% (%errorLevel%): %message%\n"))), 'dump_session_data' => false, 'logLevel' => ErrorLog::DEBUG);
$error = ErrorLog::getInstance($config);
$error->registerExceptionHandler();
$error->warn('This is an informal message', ErrorLog::INFO);
$error->warn('This is a critical message', ErrorLog::CRIT);
function test()
{
    throw new Exception('This is an exception');
}
test();