Open the system log
void openlog( const char * ident,
int facility );
- A string that you want to prepend to every message.
- A bit field specifying logging options;
a combination of one or more of the following values with an OR operation:
- If syslog() can't pass the message to
it attempts to write the message to the
/dev/console device is usually a symlink (see the
command) to a real device (e.g.
/dev/text, /dev/con1 or /dev/ser1).
- Open the connection to syslogd immediately.
Normally the opening is delayed until the first message is logged.
- Write the message to standard error output as well to the system log.
- Log the process ID with each message.
This is useful for identifying instantiations of daemons.
- Encode a default facility to be assigned to all messages that don't have an explicit facility encoded.
In the following list, parameter values marked with an
asterisk (*) aren't used by any of the QNX Neutrino standard utilities.
- LOG_AUTH *
- Authorization system.
- LOG_AUTHPRIV *
- Same as LOG_AUTH, but logged to a file readable only by selected individuals.
- LOG_CRON *
- Clock daemon.
- System daemons (such as
that aren't explicitly provided for by other facilities.
- File transfer protocol daemon.
- LOG_KERN *
- Messages generated by the kernel.
These can't be generated by any user processes.
- Line printer spooling system.
- Mail system.
- LOG_NEWS *
- Network news system.
- Messages generated internally by
- Messages generated by random user processes.
This is the default facility identifier if none is specified.
- LOG_UUCP *
- The uucp system.
- LOG_LOCAL0 through LOG_LOCAL7 *
- Reserved for local use.
Use the -l c option to
to link against this library.
This library is usually included automatically.
The openlog() function opens the system log and provides for more
specialized processing of the messages sent by
POSIX 1003.1 XSI
in the Utilities Reference