Method System.openlog()
- Method
openlog
voidopenlog(stringident,intoptions,intfacility)- Description
Initializes the connection to syslogd.
- Parameter
ident. The
identargument specifies an identifier to tag all logentries with.- Parameter
options A bitfield specifying the behaviour of the message logging. Valid options are:
LOG_PIDLog the process ID with each message.
LOG_CONSWrite messages to the console if they can't be sent to syslogd.
LOG_NDELAYOpen the connection to syslogd now and not later.
LOG_NOWAITDo not wait for subprocesses talking to syslogd.
- Parameter
facility Specifies what subsystem you want to log as. Valid facilities are:
LOG_AUTHAuthorization subsystem
LOG_AUTHPRIVLOG_CRONCrontab subsystem
LOG_DAEMONSystem daemons
LOG_KERNKernel subsystem (NOT USABLE)
LOG_LOCALFor local use
LOG_LOCAL1LOG_LOCAL2LOG_LOCAL3LOG_LOCAL4LOG_LOCAL5LOG_LOCAL6LOG_LOCAL7LOG_LPRLine printer spooling system
LOG_MAILMail subsystem
LOG_NEWSNetwork news subsystem
LOG_SYSLOGLOG_USERLOG_UUCPUUCP subsystem
- Note
Only available on systems with syslog(3).
- Bugs
LOG_NOWAIT should probably always be specified.
- See also