Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

syslog(3) OSS Library Calls Reference Manual
NAME
syslog - Generates Event Management Service (EMS) events and logs them
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossesrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zossedll |
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yossedll |
SYNOPSIS
#include <syslog.h>
int syslog(
int priority,
const char *message [value...]);
PARAMETERS
priority Indicates the priority of the EMS events generated by the syslog( ) function.
Priorities are encoded in the least significant word of the priority parameter as a
facility (bits <8:12>) and a level (bits <13:15>).
The facility field indicates the part of the system generating the event. The
default facility is LOG_USER (events generated by user processes), but the sys-
log( ) and openlog( ) functions can override it. If the facility field contains 0
(zero), the facility previously set by the openlog( ) function is used. Events can
also be generated by the kernel, a mail subsystem, system daemons, the user
authorization system, and local facilities. See the openlog(3) reference page for
a description of all facilities.
The level field indicates the severity of the event. Select the severity level from
the following list (in descending order of severity):
LOG_EMERG
A panic condition, which is normally broadcast to all users
LOG_ALERT A condition that should be corrected immediately, such as a cor-
rupted system database
LOG_CRIT A critical condition; for example, a hard device error
LOG_ERR An error condition
LOG_WARNING
A warning message
LOG_NOTICE
Not an error condition, but one that still requires special han-
dling
LOG_INFO An information message
LOG_DEBUG An event message containing information useful in debugging a
program
message [value...]
Points to a message format and message data appropriate for the event.
The string pointed to by the message parameter is similar to the string used for a
printf( ) function format parameter; both contain literal characters and conver-
sion specifications. However, in the message parameter, the %m specification
can be used to insert the current value of errno.
6218 Hewlett-Packard Company 527187-017