Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) syslog(3)
The value parameter is the same as the printf( ) value parameter. The value
parameter contains data to be converted according to the message string.
DESCRIPTION
The syslog( ) function generates Event Management Service (EMS) events, which are significant
occurrences in the subsystem environment. The syslog( ) function also sends messages about
events to the EMS subsystem, which collects and distributes event messages. Collector
processes accept event messages and write them to log files. Distributor processes retrieve event
messages from the log files, filter them based on user-defined criteria, and send them to the
appropriate destination, such as processes, printers, and terminals. See the EMS Manual for infor-
mation on configuring filters and distributors.
The default collector process is the local primary collector, $0. Alternate collectors, such as a
remote $0 or other local collectors, can be specified by the EMS_COLLECTOR environment
variable (if the application is started from the OSS environment) or the Guardian
EMSˆCOLLECTOR PARAM (if the application is started from the Guardian environment). If
you use the Guardian EMSˆCOLLECTOR PARAM, the value of the Guardian SAVE-
ENVIRONMENT PARAM must be ON. For applications that have the main routine written in
C, ON is the default value for the SAVE-ENVIRONMENT PARAM. For more information
about the Guardian SAVE-ENVIRONMENT PARAM, see the Common Run-Time Environment
(CRE) Programmer’s Guide.
If you use the Guardian EMSˆCOLLECTOR PARAM and the Guardian SAVE-
ENVIRONMENT PARAM is OFF, the syslog( ) function takes the same actions as it does when
the Guardian EMSˆCOLLECTOR PARAM is not set.
Each event message is composed of elements called tokens, which consist of data values and
tags that identify the data values. The event messages produced by syslog( ) contain the follow-
ing application-specific tokens:
ZEMS-TKN-TEXT
Contains message text. In the absence of any formatting templates, the Guardian
EMSTEXT product extracts the contents of this token as printable text.
ZOSS-TKN-FACILITY
Contains a number indicating the facility that generated the event, which by
default is LOG_USER. The priority parameter to syslog( ) and the facility
parameter to the openlog( ) function can override the default value.
ZOSS-TKN-IDENT
Contains the subject of the event. The default value is "syslog," but it can be
overridden by the ident parameter to the openlog( ) function. This token allows
identification of events generated by the same application and permits events to
be distinguished from those generated by other applications.
ZOSS-TKN-LEVEL
Contains a number that indicates the severity level of the event message as
specified by the priority parameter. Critical events are indicated by assigning the
value TRUE to the token ZEMS-TKN-EMPHASIS. The priority parameter sets
this token to TRUE if the message level is LOG_EMERG, LOG_ALERT,or
LOG_CRIT. The following table shows the OSS event levels, their correspond-
ing EMS event numbers in ZOSS-TKN-LEVEL, and the EMS event names.
527187-017 Hewlett-Packard Company 6−219