ISysEventLog.Write

Syntax

Write(Message: String; eventType: SysEventType);

Write(Message: String; eventType: Prognoz.Platform.Interop.ForeSystem.SysEventType);

Parameters

Message. Event text.

eventType. Event category.

Description

The Write method creates a record in Windows event log.

Comments

The eventType parameter cannot be equal to Null.

Example

To execute the example, add links to the system assemblies:

Sub UserProc;
Var
    WinLog: ISysEventLog;
Begin
    WinLog := New SysEventLog.Create;
    WinLog.Write("Warning!", SysEventType.Warning);
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
...
Public Shared Sub Main(Params: StartParams);
Var
    WinLog: ISysEventLog;
    SysEventLog: SysEventLog= 
New SysEventLogClass(); 
Begin
        WinLog.Write(
"Warning!", SysEventType.setWarning);
End Sub;

After executing the example a record is added to Windows event log.

See also:

ISysEventLog