NAME

catels_loginit - initialize ELS log dispatcher

SYNOPSIS

#include <cat/cat.h>

#include <cat/log.h>

int catels_loginit(const char *filename, const char **servers, catlog_dispatcher **dp);

DESCRIPTION

This function allocates and initializes a dispatcher that sends data to ELS.

The filename argument is the path name of a local spool file used for asynchronous logging. If the filename is NULL, logging is synchronous.

The servers parameter specifies ELS servers and should be a NULL-terminated array of strings with the format ``host:port''.

If the function is successful, the dp argument will contain a dispatcher that can be used as argument to catlog_setdispatcher().

RETURN VALUES

The function returns 0 if successful, or a negative code on error.

SEE ALSO

cat, catlog

catboks_loginit, catlog_setdispatcher