Write(Message: String; eventType: SysEventType);
Write(Message: String; eventType: Prognoz.Platform.Interop.ForeSystem.SysEventType);
Message. Event text.
eventType. Event category.
The Write method creates a record in Windows event log.
The eventType parameter cannot be equal to Null.
To execute the example, add links to the system assemblies:
For the Fore example: Fore.
For the Fore.NET example: ForeSystem, Metabase.
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: