Open System Services Library Calls Reference Manual (G06.27+, H06.04+)

OSS Library Calls (s) syslog(3)
NAME
syslog - Generates Event Management Service (EMS) events and logs them
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossesrl
H-series OSS processes: /G/system/zdllnnn/zossedll
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 signicant word of the priority parameter as a
facility (bits <8:12>) and a level (bits <13:15>).
The facility eld 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 eld 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 eld 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 specications. However, in the message parameter, the %m specication
can be used to insert the current value of errno.
The value parameter is the same as the printf( ) value parameter. The value
527187-004 Hewlett-Packard Company 6133