Sending Events to the Windows Event Log

Follow

JAMS has built-in functionality to send information about various Job events to the Windows Event Log.

The file shown below can be renamed to enable this functionality. It is located in C:\Program Files\MVPSI\JAMS\Scheduler\ by default.  

Rename the file from Event.EventLog.config.default to Event.EventLog.config. There is no need to restart any of the services.

The Event IDs can be linked to the following Events: 

 Event Description  Event ID

EntrySucceeded

10

EntryFailed

11

EntryStalled

12

EntryShort

13

EntryRunaway

14

EntryMissedWindow

19

 

Explanations of these Alerts can be found here.

The Events listed above are currently the only Events that are reported to the Windows Event Log. 

In the Application Event Log will be the Job Name, Entry ID Number, and Final Status as shown below, as well as the corresponding Windows Event ID number (11 in this case).

 

In addition, it is possible to add custom information to the event log using a custom event handler that can be built from the JAMS API. 

Attached is a sample Visual Studio project that could be used as a guide for your own application. The sample code shows an example of EntryFailed events, takes the summary from the JAMS Alert definition, formats it and writes it to the Windows Event Log.

Have more questions? Submit a request

Comments