Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (n - r) openlog(3)
NAME
openlog - Initializes Event Management Service (EMS) event log files
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 openlog(
const char *ident,
int logopt,
int facility);
PARAMETERS
ident Contains a pointer to an identity (event subject) string, which by default contains
"syslog." The calling process must not deallocate or override the identity string
until a new string is specified through a subsequent call to the openlog( ) func-
tion.
The event subject string becomes the value of the EMS token ZOSS-TKN-
IDENT. Refer to the syslog(3) reference page either online or in the Open Sys-
tem Services Library Calls Reference Manual for more information about the
use of this token.
logopt Specifies options that modify the operation of openlog( ). The following logging
options can be logically ORed to create the value for this parameter:
LOG_CONS Forces sending the event message to the local primary collector,
$0, if the message cannot be sent to the collector 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 LOG_CONS is not set when the
syslog( ) function is called and the message cannot be sent to the
collector specified by the EMS_COLLECTOR environment
variable or the Guardian EMSˆCOLLECTOR PARAM, the
syslog( ) function takes no further action.
LOG_NDELAY
Opens the connection to the collector process immediately.
Normally, the openlog( ) function does not open this connection
until the first event message is logged.
If you specify both LOG_NDELAY and LOG_ODELAY, only
LOG_ODELAY has effect.
LOG_NOWAIT
Has no effect. This option is included for compatibility with
certain UNIX systems.
LOG_ODELAY
Opens the connection to the collector process only when the first
event message is to be logged. This is the default collector pro-
cess connection option.
If you specify both LOG_NDELAY and LOG_ODELAY, only
527187-017 Hewlett-Packard Company 5−41