<?php require_once 'Log.php'; function errorHandler($code, $message, $file, $line) { global $logger; /* Map the PHP error to a Log priority. */ switch ($code) { case E_WARNING: case E_USER_WARNING: $priority = PEAR_LOG_WARNING; break; case E_NOTICE: case E_USER_NOTICE: $priority = PEAR_LOG_NOTICE; break; case E_ERROR: case E_USER_ERROR: $priority = PEAR_LOG_ERR; break; default: $priotity = PEAR_LOG_INFO; } $logger->log($message . ' in ' . $file . ' at line ' . $line, $priority); } $logger = &Log::singleton('console', '', 'ident'); set_error_handler('errorHandler'); trigger_error('This is an information log message.', E_USER_NOTICE);
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
composite.php | File | 305 B | 0644 |
|
console.php | File | 149 B | 0644 |
|
display.php | File | 280 B | 0644 |
|
error_log.php | File | 169 B | 0644 |
|
file.php | File | 216 B | 0644 |
|
firebug.php | File | 270 B | 0644 |
|
mail.php | File | 226 B | 0644 |
|
null.php | File | 133 B | 0644 |
|
observer_mail.php | File | 655 B | 0644 |
|
pear_error_handler.php | File | 620 B | 0644 |
|
php_error_handler.php | File | 768 B | 0644 |
|
sql.php | File | 220 B | 0644 |
|
sqlite.php | File | 489 B | 0644 |
|
syslog.php | File | 156 B | 0644 |
|
win.php | File | 208 B | 0644 |
|