Current Location: Home> Function Categories> syslog

syslog

Generate system log messages
Name:syslog
Category:Network
Programming Language:php
One-line Description:Generate system log messages.

Definition and usage

syslog() function generates a system log message.

Example

Turn on and close the connection to the system logger:

 <?php
function _log ( $text ) {
openlog ( "phperrors" , LOG_PID | LOG_PERROR ) ;
syslog ( LOG_ERR , $text ) ;
closelog ( ) ;
....​
....​
}
?>
Similar Functions