Kbase 21931: How To Send Messages to the Event Viewer with Logevent.exe
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/1/2002 |
|
SUMMARY:
Logevent.exe is an Event Logging Utility provided with MS Windows 2000 and MS Windows NT Resource Kit. It can be used from Progress, through the OS-COMMAND, to create and to log custom events to the Application Log of Event Viewer.
EXPLANATION:
Messages can be sent to the Application log (Event Viewer) not only to
the local machine where the application is running, but also to any other machine within the network (if you have the necessary permissions). It is even possible to send messages on "behalf" of other applications.
SOLUTION:
Example OS-COMMAND:
OS-COMMAND silent logevent -m \\computername -s severity -c categorynumber -r source -e eventID -t timeout " event text "
The parameters:
-m \\computername: If this parameter is omitted the event is logged
on the local computer.
-s severity: (S:Success, I:Information (default), W:Warning, E:Error, F:Failure)
-c categorynumber: Default value 0 (none).
-r source: Application source name.
-e eventID: Integers from 0 to 65535.Default value 1.
-t timeout: Default 1 second
References to Written Documentation:
Progress Knowledge Base Solution 21929, "How to Send Messages to the Event Viewer Through Windows API"
http://support.microsoft.com/view/tn.asp?kb=315410