SPD_LogMessage

Purpose

Format and send a log event to the Event Server.

Syntax

#include "spd.h"
 
SPD_errorTP SPD_LogMessage(
   char *logName,
   char *messageType,
   char *message,
   char *application,
   char *applicationQualifier,
   time_t timeValue
);

Description

logName

is the name of the log where the message should be logged. It is written to the current day’s file for that log.

messageType

is a two-character identifier for the message. This is an optional parameter. If you specify NULL, the message type is set to NO (normal).

message

is the message to be logged.

application

identifies the application that logged the message. Specify NULL if the application is the same as the application that you specified on the call to SPD_InitClient.

applicationQualifier

further qualifies the application in the case where more than one instance of the application may be present. Specify NULL if the application qualifier is the same as the application qualifier that you specified on the call to SPD_InitClient.

timeValue

is the local time to be associated with the logged message. Specify the result of the C time function or 0 if no local time is to be associated with the message.

Return Value

The return value indicates whether an error occurred, as follows:

Return

Indication

SPD_normalCN

No error

SPD_notInitializedCN

SPD_InitClient not called previously

SPD_badFileNameCN

Bad logFileName parameter

SPD_badTextCN

Bad message parameter

SPD_commFailureCN

Communications problem

See Also

See also the client function SPD_HandleEvent ([xref text to replace]).

Use of this function is illustrated in 6.3.