<?php require_once 'Log.php'; function errorHandler($error) { global $logger; $message = $error->getMessage(); if (!empty($error->backtrace[1]['file'])) { $message .= ' (' . $error->backtrace[1]['file']; if (!empty($error->backtrace[1]['line'])) { $message .= ' at line ' . $error->backtrace[1]['line']; } $message .= ')'; } $logger->log($message, $error->code); } $logger = &Log::singleton('console', '', 'ident'); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'errorHandler'); PEAR::raiseError('This is an information log message.', PEAR_LOG_INFO);
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 |
|