LogWriteEventLog

Writes a message to the Event Log.

Member of namespace

Maintenance Manager

Syntax

bool LogWriteEventLog (string message, int level, int eventID)

Parameters

message
Type: string
level
Type: int
eventID
Type: int

Parameters

  • message: Message to write to the Event Log and the local log. Smart parameters are supported.
  • level: Integer value. 0 - informational, 1 - Warning, 2 - Error.
  • eventID: Integer value. Desired Event ID.

Returns

True if the event is successfully logged. Otherwise, False.

Level

Any level.

Details

Unconditionally writes out a message to the Windows Event Log and to the application log file for the running task. Set the level and event ID to the values that is appropriate for the message being logged.
Example:
LogWriteEventLog("This is an informational message.", "0", "10")  

This example writes the message This is an informational message. to the event log.

LogWriteEventLog("@B.MyMessage", "0", "10")

This example uses Smart parameters to write out the value of the batch level variable MyMessage.