Name
openlog
Synopsis
int openlog(stringidentity
, intoptions
, intfacility
)
Opens a connection to the system logger. Each message sent to
the logger with a subsequent call to syslog( )
is prepended by
identity
. Various options can be
specified by options
; OR any options you
want to include. The valid options are:
| If an error occurs while writing to the system log, write the error to the system console. |
| Open the system log immediately. |
| Delay opening the system log until the first message is written to it. |
| Print this message to standard error in addition to writing it to the system log. |
| Include the PID in each message. |
The third parameter, facility
,
tells the system log what kind of program is logging to the system
log. The following facilities are available:
| Security and authorization errors
(deprecated; if |
| Security and authorization errors |
| Clock daemon (cron and at) errors |
| Errors for system daemons not given their own codes |
| Kernel errors |
| Line printer subsystem errors |
| Mail errors |
| USENET news system errors |
| Errors generated internally by syslogd |
| Security and authorization errors |
| Generic user-level errors |
| UUCP errors |
Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.