SPDLogMessage

Purpose

Format and send a log event to the Event Server.

Syntax

#using Spo.SPDlib
SPD_errorType SPDLogMessage
(
   string logFileName,
   string messageType,
   string message,
   string application,
   string applicationQualifier,
   string timeValue
);

Description

This function formats and sends a log event to the Event Server. The application name and qualifier that was specified on the call to SPDInitClient is automatically included in the log event.

logFileName

is the name of the file to which 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. Specify NULL if the message is not typed.

message

is the message to be logged. There is no maximum length limit for the message text at this time.

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 SPDInitClient.

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 SPDInitClient or if the application does not need to be further qualified.

timeValue

is the time to be associated with the logged message. Specify NULL if no time is to be associated with the message.

Return Value

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

Return

Indication

SPD_normal

No error

SPD_notInitialized

SPDInitClient not called previously

SPD_badFileName

Bad logFileName parameter

SPD_badText

Bad message parameter

SPD_badTime

Bad time string

SPD_commFailure

Communications problem

SPD_errException

A .NET runtime exception occurs

See Also

See also the following client functions: