This allows OC to write selected events from Activity Log to windows event log.
Question / Problem:
How to enable Event Logging functionality ?
Answer / Solution:
Listed below are the steps to configure Event Logging in OC.
Message System Setup:
1. Traverse to Flow\Prog folder and double click on WSETUP.exe and enter the credentials.
2. Navigate to Miscellaneous menu and then click on Default Settings.
3. Under the “System” heading, tick on “Record System Activity in event log”.
4. Click “OK” then exit WSetup.
1. Navigate to C:\Windows and open “Flow.ini” file.
2. Navigate to the “Environment” section.
3. Add the following lines:
4. Save and close Flow.ini.
EventLogConfig.xml is used to select which specific events are written to the Windows Event Log and with which severity they are reported. The file can be found at C:\Program Files\Optitrade Confirm\Flow\Data.
Firstly, the following tag must be present and set to true in order to enable the event logging functionality defined in the file:
Next, the following tag must be present:
If “log” is set to “true”, Optitrade Confirm will report every possible event to Windows Event Log. Note: this is not recommended as many lower-level events will be unnecessarily logged. Instead, this tag should be set to “false” and the required events configured inside the tag.
Inside the ActivityLogEvents tag, there is a list of all the event codes which are used to select which events to log. In order to log a particular event, a “LogEvent” tag must be present. An example of this tag is as follows:
<LogEvent eventid="4179" log="true" level="Information"> </LogEvent>
The above tag logs any System related events in the Event Log, as “4179” is the event code for “System”. The events are logged with a level of “Information”.As many “LogEvent” tags can be present as required, depending how many events need to be logged.
The following attributes can be used to customise every event:
log – ‘true’ or ‘false’ – whether or not to log this event.
level – ‘Warning’, ‘Information’ or ‘Error’ – which severity to report the event to Windows Event Log with.
contains - any string value (to look for sub string in Information).
startwith - any string value (to look for starting string in Information).
endwith - any string value (to look for ending string in Information).
Some events fall under the Direct Events category, as opposed to Activity Log Events. To log these events, the following tag must be present:
As with ActivityLogEvents, if log is set to “true” Optitrade Confirm will report every possible event to Windows Event Log. Instead, this tag should be set to “false” and the required events configured inside the tag in the same way as the Activity Log Events. A sample tag is as follows:
<LogEvent eventid="105" log="true" level="Information"/>
In this case, whenever a service is started, it will be logged with a level of “Information”. This is because “105” is the event code for “The service was started”.
An Information Filter can be set on any event, in the following format:
<LogEvent eventid="4187" log="true" level="Error">
<InformationFilter log="true" startwith="Omgeo" level="Information"/>
This controls which severity to log the event as depending on the event text, overriding the top-level “LogEvent” tag. For example, the above filter logs *Failed messages at a level of “Error” but if the event starts with “Omgeo”, ie the *Failed message is a CTM message, the event is logged at a level of “Information”.
Sample EventLogConfig Settings :
The Activity Log Events to be reported in Windows Event log are as follows:
The following events will be reported:
· System events – level Information
· *Failed messages – level Error, except those starting with “Omgeo” (ie. failed CTM messages) which have level Information
· Failed messages – level Error, except those starting with “OG Direct” (ie. failed host messages) which have level Information
· Import failed – level Error
· Router Suspended – level Information for all gateways unless the event text contains “CTMAdapter”, when it has level Warning
· Router Started – level Information for all gateways
· Diagnostic – level Error
· Warning – level Information
The recommended Direct Events to be reported to Windows Event log are as follows:
The following events will be reported:
· The service was started – level Information
· The service was stopped – level Error
· CTM connections issue – level Error
Windows Logs Screenshots:
Hope this article is helpful.
If you have further questions or need assistance in configuring Event Logging functionality please contact Optitrade Tech Support.
AUTHOR: Anu Soundararajan