Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 8
Open the system log
#include <syslog.h>
void openlog( const char * ident,
int logopt,
int facility );
- ident
- A string that you want to prepend to every message.
- logopt
- A bit field specifying logging options;
a combination of one or more of the following values with an OR operation:
- LOG_CONS
- If syslog() can't pass the message to
syslogd,
it attempts to write the message to the
/dev/console device.
The
/dev/console device is usually a symlink (see the
ln
command) to a real device (e.g.
/dev/text, /dev/con1 or /dev/ser1).
- LOG_NDELAY
- Open the connection to syslogd immediately.
Normally the opening is delayed until the first message is logged.
- LOG_PERROR
- Write the message to standard error output as well to the system log.
- LOG_PID
- Log the process ID with each message.
This is useful for identifying instantiations of daemons.
- facility
- 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.
- LOG_DAEMON
- System daemons (such as
routed)
that aren't explicitly provided for by other facilities.
- LOG_FTP
- File transfer protocol daemon.
- LOG_KERN *
- Messages generated by the kernel.
These can't be generated by any user processes.
- LOG_LPR
- Line printer spooling system.
- LOG_MAIL
- Mail system.
- LOG_NEWS *
- Network news system.
- LOG_SYSLOG
- Messages generated internally by
syslogd.
- LOG_USER*
- 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.
libc
Use the -l c option to
qcc
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
syslog()
and
vsyslog().
See syslog().
POSIX 1003.1 XSI
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
closelog(),
setlogmask(),
syslog(),
vsyslog()
logger,
syslogd
in the Utilities Reference
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 237
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/o/openlog.html on line 237