TraceLoggingActivity Class

Provides support for logging ETW events during an activity. All events must be manually tagged or nested.

TraceLoggingActivity has these types of members:

Constructors

The TraceLoggingActivity class has these constructors.
Constructor Description
TraceLoggingActivity Constructor Creates a new TraceLoggingActivity object.
TraceLoggingActivity Constructor Transfers ownership of an activity from an existing instance to this instance.
TraceLoggingActivity Destructor Writes a default stop event if the activity has been started, but has not been stopped.

Methods

The TraceLoggingActivity class has these methods.
Method Description
TraceLoggingActivity::Id Returns a pointer to the activity�s unique identifier (GUID).
TraceLoggingActivity::IsStarted Returns true if the activity has been started.
TraceLoggingActivity::Provider Returns the handle to the TraceLogging provider associated with this activity.
TraceLoggingActivity::SetRelatedActivity Sets the related activity.
TraceLoggingActivity::SetRelatedActivityId Sets the related activity using the unique identifier.

Properties

The TraceLoggingActivity class has these properties.
Property Description

Keyword constant

The value of the keyword that will be used in the activity�s start and stop events.

Level constant

Contains the value of the level that will be used in the activity�s start and stop events.

Methods

The TraceLoggingActivity class has these methods.

Method Description
TraceLoggingActivity::Provider Returns the handle to the TraceLogging provider associated with this activity.
TraceLoggingActivity::SetRelatedActivity Sets the related activity for this TraceLoggingActivity object.
TraceLoggingActivity::SetRelatedActivityId Uses the unique identifier of an activity to set the related activity for this TraceLoggingActivity object.
TraceLoggingActivity::SetRelatedActivityId Uses the unique identifier of an activity to set the related activity for this TraceLoggingActivity object.
TraceLoggingActivity::TraceLoggingActivity Creates a new TraceLoggingActivity object.
TraceLoggingActivity::TraceLoggingActivity Creates a new TraceLoggingActivity object.

Remarks

In order to use TraceLogging activities, you need to define an instance of either TraceLoggingActivity or TraceLoggingThreadActivity. After you have created an instance of one of these classes, you manipulate activity logging using TraceLoggingFunction, TraceLoggingWriteStart, TraceLoggingWriteStop, and TraceLoggingWriteTagged. This class automatically creates a unique identifier when it is started and tracing is turned on.

You can nest activities manually by providing unique identifiers to the TraceLoggingWriteStart and TraceLoggingWriteStop macros.

Requirements

   
Header traceloggingactivity.h

See Also

TraceLoggingThreadActivity Class