Name
openlog
Synopsis
bool 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 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access