next up previous
Next: logDaemon Overview Up: Introduction Previous: Introduction

Client Overview

The client library provides the following calls:

int logOpen(LOGHANDLE *h, char *serviceId, char *sourceId, char *tagList);
int logString(LOGHANDLE h, char *valueList);
int logArguments(LOGHANDLE h, ...);
int logArray(LOGHANDLE h, char *valueArray[]);
int logClose(LOGHANDLE h);

A connection to the logDaemon is opened with logOpen(). The user provides a pre-allocated LOGHANDLE for use in subsequent calls. The sourceId is an arbitrary string designed to identify the class of log messages. The serviceId ptr may be NULL, in which case the default logDaemon is contacted. Alternately, a specific logDaemon may be requested by name (must agree with name given logDaemon at startup). The tagList is a space delimited set of tag names which correspond to the sourceId. These define the field names which are given values in subsequent logString() or logArguments() calls.

The LOGHANDLE is then valid for all other calls until logClose() is called on it, at which time it may be re-used.

The logString(), logArguments(), and logArray() functions submit a log message. They are identical except for the manner in which you supply the series of tag values. logString() expects a single, space delimited string of tag values. logArguments() expects a series of (char *) arguments, each supplying one tag value. The last argument must be NULL. logArray() expects an array of character pointers, each element pointing to one NULL terminated tag value. The last element must be a NULL pointer.

The command line utility logMessage is provided to permit simple, command line submission of log messages. An example is as follows (tag value follows tag name):

  logMessage -sourceId=IOC -tag=system RecSupport -tag=subsystem AO


next up previous
Next: logDaemon Overview Up: Introduction Previous: Introduction
Robert Soliday 2005-05-02