next up previous
Next: logDaemon Reference Up: APS logDaemon and Client Previous: logDaemon Overview

Client Library Reference

#include $<$logDaemonLib.h$>$

logOpen

int logOpen(LOGHANDLE *h, char *serviceId, char *sourceId, char *tagList);

Open a connection with the logDaemon (not in TCP sense, though, since library is UDP based). User must provide a ptr to a pre-allocated LOGHANDLE. The sourceId is an arbitrary string up to 250 chars in length. The serviceId ptr may be NULL, in which case the default logDaemon is contacted. Otherwise, serviceId is an arbitrary string up to 255 chars in length. The tagList is a space delimited set of tag names. Tag names may not have spaces in them. Each tag name may be up to 255 chars in length.

Returns:

logString

int logString(LOGHANDLE h, char *valueList);

Sends a log message to the logDaemon. The message is time-stamped with secs and usecs past UNIX epoch automatically. The remaining data comes from valueList, a space delimited string of tag values. There must be a value supplied for each tag defined by the logOpen() call. If a tag value has internal spaces, you must double quote the full value. Ie. ``val1 ``val2 with spaces'' val3''. The valueList has no size limit other than that imposed by the UDP packet size.

Returns:

logArguments

int logArguments(LOGHANDLE h, ...);

Sends a log message to the logDaemon. The message is time-stamped with secs and usecs past UNIX epoch automatically. The remaining data comes from a series of (char *) arguments, the last of which must be NULL. Ie. logArguments(h, ``val1'', ``val2'', NULL); There must be a value supplied for each tag defined by the logOpen() call.

Returns:

logArray

int logArray(LOGHANDLE h, char *valueArray[]);

Sends a log message to the logDaemon. The message is time-stamped with secs and usecs past UNIX epoch automatically. The remaining data comes from valueArray, an array of pointers to null terminated value strings. The last element of the array must be NULL. Ie. val[0] = ``this''; val[1] = ``that'' ; val[2] = NULL; logArray(h, val). There must be a value supplied for each tag defined by the logOpen() call.

Returns:

logClose

int logClose(LOGHANDLE h);

Close up logDaemon ``connection''. LOGHANDLE may be reused after closing.

Returns:


next up previous
Next: logDaemon Reference Up: APS logDaemon and Client Previous: logDaemon Overview
Robert Soliday 2005-05-02