PHP syslog() Function
Example
Open and close connection of system logger:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Definition and Usage
The syslog() function generates a system log message.
Syntax
syslog(priority, message)
Parameter Values
Parameter | Description |
---|---|
priority | Required. Specifies ... Can be one of the following options:
|
message | Required. Specifies the message to send |
Technical Details
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
❮ PHP Network Reference