Event Log
Overview and Key Concepts
When Enable Logging is checked, the Event Log will create a record of events that occur in the model. It is useful for seeing the order in which certain events took place. For each event that happens in the model, multiple entries may be made in the Event Log to explain what happened during that event. These multiple entries will all have the same time and all be logged simultaneously when you press the Step button. The event log will be cleared when the model is reset.
Some exceptions will be recorded in the event log. The entry immediately preceeding the exception entry will give you a clue as to where the code is that caused the exception to happen. This is particularly useful if the exception was caused by improper code in an object's trigger. More information about the exception may be available in the System Console. The model may not be behaving correctly if there are exceptions happening in the code.
The Event Log is accessed from the Debug menu on the main toolbar.
Properties
The Event Log has the following properties:
Enable Logging
This will enable or disable event logging. The model will run much slower when logging is enabled so you should disable logging when you are finished using the event log.
Log File Path
The Event Log stores its data in a file on the hard drive. You can view a shortened path of the file in this interface and use the accompanying browse button to select any desired location.
Settings...
Within the settings window, you can set up which events should be recorded in the event log in two ways. First, you can filter by model time. You can adjust the start time and optionally the end time. Only events that occur between these times will be recorded. In addition, you can filter by event type. Events that have already been recorded will not be affected by changing these settings. Events that occur after changing these settings will only be recorded if they are enabled here.
The start and end time are explained in the following sections.Start Time
If you only want to log a specific time period, you can enter a start time for when the logging will begin.
End Time
Optionally, you can specify an end time for when you want the logging to stop. If the end time is less than or equal to the start time, it will be ignored.
Export...
This will export the Event Log as a csv file. If will only export valid events, ignoring any events that have been filtered out.
The Table
The table has the following properties:
- Time - This is the time that the event happened. The entries happened in order from top to bottom. Entries recorded with the same time happened in the order shown and may have happened during the same model event.
- Event - This is the type of event. You can enable or disable logging for certain event types in the Settings window.
- Object - This is the path to the event's object.
- Involved - This is the path to the involved object for the event.
- P1 - P4 - These values depend on the event and may not be used for all event types. Usually they give you information about what parameters were passed into the event or more information about the event type. This is useful for debugging if parameter values are not what you expect them to be.
Filters
The Event Log can be filtered based on the Time, Event, Object and Involved columns. Columns with an active filter will display a . To add/edit a filter, left-click on the header name for the desired filter. Event log entries that are no longer displayed because they have been filtered will not be exported with the Export button.
It has the following properties:
- Time - Each time filter has a begin (left) and an end (right) field. Only events that occurred within those two times will be displayed. To add a filter, click the icon. To remove a filter, click the icon.
- Event - This list allows you to filter the list by which event or trigger the event was associated with. To include or exclude an event from the list, check or uncheck the box next to its name.
- Object - This list allows you to filter the list by which object generated the event. To include or exclude an object in the list, check or uncheck the box next to its name.
- Involved - This list allows you to filter the list by which object is involved in the event. To include or exclude an object in the list, check or uncheck the box next to its name.