Cicode Programming Reference > Cicode Function Categories > Error Functions Introduction > ErrLog

ErrLog

Logs a message to the CitectSCADA system log file.

This function is useful for logging errors in user functions, and for debugging user functions. The CitectSCADA system log file 'SYSLOG.DAT' is created in the local Windows directory of the computer, C:\Documents and Settings\All Users\Application Data\Citect\CitectSCADA 7.20\Logs.

Syntax

ErrLog(Message)

Message:

The message to log. This field can also contain control (such as /n) and formatting characters.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DebugMsg, DebugMsgSet, CodeTrace, TraceMsg, Halt

Example

FUNCTION MyFunc(INT Arg)
IF Arg<0 THEN
ErrLog("Invalid arg in Myfunc");
Halt();
END
END

See Also

Error Functions