X7ROOT File Manager
Current Path:
/usr/share/doc/cpanel-php81-log-1.13.3/examples
usr
/
share
/
doc
/
cpanel-php81-log-1.13.3
/
examples
/
📁
..
📄
composite.php
(305 B)
📄
console.php
(149 B)
📄
display.php
(280 B)
📄
error_log.php
(169 B)
📄
file.php
(216 B)
📄
firebug.php
(270 B)
📄
mail.php
(226 B)
📄
null.php
(133 B)
📄
observer_mail.php
(655 B)
📄
pear_error_handler.php
(620 B)
📄
php_error_handler.php
(768 B)
📄
sql.php
(220 B)
📄
sqlite.php
(489 B)
📄
syslog.php
(156 B)
📄
win.php
(208 B)
Editing: php_error_handler.php
<?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);
Upload File
Create Folder