LG_Log

LG_Log — writes point data in formatted lines.

Syntax

#include <cogent.h>
ST_STATUS LG_Log(IP_Task*  myself,
 IP_Task*  textlog,
 char*  retbuf,
 int  buflen,
 char*  label,
 char*  spec,
 int  npoints,
 char**  pointnames);

Arguments

myself

A pointer to this task's IP_Task structure normallly generated by a call to IP_NserveInit.

textlog

A pointer to the Cascade TextLogger's IP_Task structure, normally generated by a call to IP_TaskFindName.

retbuf

A pointer to a character buffer to hold the return from the call.

buflen

The length of retbuf, in bytes.

label

The name of the log.

spec

The format string for the log line, similar to the kind used in the printf statement. Please refer to the Cascade TextLogger log command documentation for details.

npoints

The number of entries in the array pointnames.

pointnames

The names of the points corresponding to format directives in the spec format string.

Returns

ST_OK on success. Otherwise ST_ERROR, and the retbuf will contain a more detailed error message (see log in the Cascade TextLogger documentation). If the return value is ST_OK, the retbuf may not contain useful information.

Description

This function specifies which points to log, and the format of each line of the written output. It corresponds to the Cascade TextLogger log command.