Visual Studio Analyzer
Event Log Basics

An event log is a binary file where Visual Studio Analyzer stores the events it collects. This event log can be read only through the Visual Studio Analyzer user interface or programmatically through the automation model. After you create a recording filter and started recording, an event log is created automatically. Visual Studio Analyzer collects the events that your application generates into that event log. You can then pause, resume, stop recording, or play back the events in that event log.

The active recording filter determines the events recorded into the event log. After they are created and used for recording events, event logs become read-only. You open views on event logs so you can see the contents. The default view associated with an event log is the Event List view. A filter can then be used to exclude the components and events that do not show evidence of a problem. The following figure illustrates the process of event collection into the event log.

Note   Event logs can become very large. Therefore, each time you stop recording on an event log, it closes. If you want to run your application again and collect data from it, a new event log is created.

Event Logs vs. Standard Log Files

A standard log file is a text file that lists information that has been collected. An event log provides you with more control over data than a standard log file. Through it, you can:

  • Filter events in the log, both when you collect them and when you analyze them. Filtering keeps the log from getting too large.
  • Use predefined categories for events, gaining an extra level of structure in the log.

Event Log Creation

Although Visual Studio Analyzer automatically creates an event log when you begin recording, you can create as many event logs as you like; only available system resources limit the number. However, you can have only one event log that is actively recording events at a time.

Filters and Event Logs

You can reduce the set of events displayed in a Visual Studio Analyzer view by applying a filter to that view. This is called the view filter. Filters can also determine what events should be collected. This is called the collection filter. For more information, see Filters.

Event Logs and Views

When you open an event log in a Visual Studio Analyzer views, the view is automatically filtered — that is, the filter applied to any other open view is also applied to the view in which you open the event log. If there are no other open views, or if none of the other open views have filters applied, the view is unfiltered. This means that you see all the events in the event log.

You can apply any filter you want to the view automatically, or you can edit the existing filter. Remember that if the view is filtered, changes you make to the filter are reflected in all views. A filter changes what you see in an event log. It does not affect the actual contents of the event log.

You open views on event logs so you can see the contents of the log. The default view associated with an event log is the Event List view. If you are in the Event List view while events are being recorded, the active log continues to record events from your application while you are looking at it. You can also have views open for more than one event log at any time. For example, you might have log 1, which is active, open in a Block Diagram view and, at the same time, have log 2 open in another Event List view. The logs are independent of each other. You can open as many views on a log as you want.

Event Log Files

Visual Studio Analyzer stores the event logs as a file with the .val extension. You can save an event log and then copy it to other projects. You can open a saved event log and include it with your project. This makes it easier to share event logs among team members.

See Also

Events and Event Logs | Event Basics | Recording Events | Playing Back Events | Renaming and Deleting Event Logs | Importing and Exporting Event Logs | Setting Up Performance Analysis

Page view tracker