NAME

catgen_initels - set up ELS logging interface

SYNOPSIS

#include <cat/gen.h>

int catgen_initels(void);

DESCRIPTION

This function reads configuration parameters and sets up the ELS interface.

Configuration parameters are read from ``.global.els.'' in the catinfo tree. The server list (.global.els.servers) is mandatory, the remaining parameters are optional.

If no servers are defined then ELS logging is not used, which is not regarded as an error.

The parameters read from ``.global.els.'' are:

servers
A list of ELS servers to which the logs can be sent. This is mandatory if ELS logging is required. If no servers are specified, ELS logging will not be used. The server list is a comma-separated list, where each element has the format:

        I<ip address or name>:I<port>

logfile
The ELS spool file. This must be supplied if logging is to be performed using the catlogger program. Otherwise, logging will be synchronous.

RETURN VALUES

The function returns 0 if successful or if there is insufficient configuration data to complete the operation, or a negative code on error.

SEE ALSO

cat, catgen

catgen_certerrtologid, catgen_initlog, catgen_initlogfile, catgen_loadloglabels, catgen_log