Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
System

Method System.openlog()


Method openlog

void openlog(string ident, int options, facility)

Description

Initializes the connection to syslogd.

Parameter ident.

The ident argument specifies an identifier to tag all logentries with.

Parameter options

A bitfield specifying the behaviour of the message logging. Valid options are:

LOG_PID

Log the process ID with each message.

LOG_CONS

Write messages to the console if they can't be sent to syslogd.

LOG_NDELAY

Open the connection to syslogd now and not later.

LOG_NOWAIT

Do not wait for subprocesses talking to syslogd.


Parameter facility

Specifies what subsystem you want to log as. Valid facilities are:

LOG_AUTH

Authorization subsystem

LOG_AUTHPRIV 
LOG_CRON

Crontab subsystem

LOG_DAEMON

System daemons

LOG_KERN

Kernel subsystem (NOT USABLE)

LOG_LOCAL

For local use

LOG_LOCAL1
LOG_LOCAL2
LOG_LOCAL3
LOG_LOCAL4
LOG_LOCAL5
LOG_LOCAL6
LOG_LOCAL7
LOG_LPR

Line printer spooling system

LOG_MAIL

Mail subsystem

LOG_NEWS

Network news subsystem

LOG_SYSLOG 
LOG_USER 
LOG_UUCP

UUCP subsystem


Note

Only available on systems with syslog(3).

Bugs

LOG_NOWAIT should probably always be specified.

See also

syslog , closelog