syslog
Description
Syntax
syslog( int $priority, string $message ): true
Parameters
priority
A combination of the facility and the level.
Constant (descending order) | Description |
---|---|
LOG_EMERG | system is unusable |
LOG_ALERT | action must be taken immediately |
LOG_CRIT | critical conditions |
LOG_ERR | error conditions |
LOG_WARNING | warning conditions |
LOG_NOTICE | normal, but significant, condition |
LOG_INFO | informational message |
LOG_DEBUG | debug-level message |
message
The message to send.
Return
Always returns true.
Examples
1 · priority message
<? function authorized_client() { return false; } $prefix = "myprefix"; $flags = LOG_PID | LOG_PERROR; $facility = LOG_USER; openlog($prefix, $flags, $facility); if(authorized_client()) { echo "authorized client"; } else { $priority = LOG_WARNING; $message = "unauthorized client"; $return = syslog($priority, $message); var_export($return); } closelog(); ?>
true
Links
Related
Network
- checkdnsrr
- closelog
- dns_check_record
- dns_get_mx
- dns_get_record
- fsockopen
- gethostbyaddr
- gethostbyname
- gethostbynamel
- gethostname
- getmxrr
- getprotobyname
- getprotobynumber
- getservbyname
- getservbyport
- header
- header_register_callback
- header_remove
- headers_list
- headers_sent
- http_response_code
- inet_ntop
- inet_pton
- ip2long
- long2ip
- openlog
- pfsockopen
- setcookie
- setrawcookie
- socket_get_status
- socket_set_blocking
- socket_set_timeout