LG_Output

LG_Output — writes an output string to a log or group, stdout, or stderr.

Syntax

#include <cogent.h>
ST_STATUS LG_Output(IP_Task*  myself,
 IP_Task*  textlog,
 char*  retbuf,
 int  buflen,
 char*  label,
 char*  output);

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 log or group to which the output will be written. You can also specify stdout to write to standard output, or stderr to write to standard error.

output

The text to write.

Returns

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

Description

This function inserts an output string as a line into a log or group, standard output, or standard error. If the label is for a single log, the string will appear in that log only. If the label is for a group, then the string will appear in each of the logs pertaining to that group.

This function corresponds to the Cascade TextLogger output command.