TraceLogging

Overview of the TraceLogging technology.

To develop TraceLogging, you need these headers:

For programming guidance for this technology, see:

Class

Title Description
TraceLoggingActivity Provides support for logging ETW events during an activity. All events must be manually tagged or nested.
TraceLoggingThreadActivity Provides support for logging ETW events during an activity. Events will be automatically tagged with or nested in this activity.
TraceLoggingThreadActivityIdSetter Tags a thread with an activity id so ETW marks all events in that thread with the activity id.

Functions

Title Description
~TraceLoggingThreadActivityIdSetter Restores the original activity ID to the thread.
Provider Returns the handle to the TraceLogging provider associated with this activity.
SetRelatedActivity Sets the related activity for this TraceLoggingActivity object.
SetRelatedActivityId Uses the unique identifier of an activity to set the related activity for this TraceLoggingActivity object.
SetRelatedActivityId Uses the unique identifier of an activity to set the related activity for this TraceLoggingActivity object.
TRACELOGGING_DECLARE_PROVIDER Forward declares a global TraceLogging provider handle.
TRACELOGGING_DEFINE_PROVIDER Allocates storage for a TraceLogging provider and creates a handle to the provider.
TRACELOGGING_DEFINE_PROVIDER_STORAGE Allocates storage for a TraceLogging provider. This macro should only be used for advanced scenarios.
TraceLoggingActivity Creates a new TraceLoggingActivity object.
TraceLoggingActivity Creates a new TraceLoggingActivity object.
TraceLoggingBinary Wrapper macro for raw binary data.
TraceLoggingChannel Wrapper macro for setting the event's channel.
TraceLoggingCustom Wrapper macro for an event field packed using a custom serializer.
TraceLoggingCustomAttribute Wrapper macro for adding custom information about an event to the PDB.
TraceLoggingDescription Wrapper macro for setting a description for an event.
TraceLoggingEventTag Wrapper macro for setting the event's tag(s).
TraceLoggingFunction Creates a TraceLoggingThreadActivity named after the current function and writes a Start event for the activity. A Stop activity will be written at the end of the current scope.
TraceLoggingKeyword Wrapper macro for setting the event's keyword(s).
TraceLoggingLevel Wrapper macro for setting the event's level.
TraceLoggingOpcode Wrapper macro for setting the event's opcode.
TraceLoggingOptionGroup Wrapper macro for use in TRACELOGGING_DEFINE_PROVIDER to declare the GUID of the provider group that the provider is a member of.
TraceLoggingRegisterEx Registers a TraceLogging provider with callback so that it can be used for to log events.
TraceLoggingSocketAddress A wrapper macro that provides trace logging for socket addresses.
TraceLoggingStruct Wrapper macro for defining a group of related fields in an event.
TraceLoggingThreadActivityIdSetter Creates a new TraceLoggingThreadActivityIdSetter object.
TraceLoggingThreadActivityIdSetter Creates a new TraceLoggingThreadActivityIdSetter object.
TraceLoggingThreadActivityIdSetter Creates a new TraceLoggingThreadActivityIdSetter object.
TraceLoggingValue Wrapper macro for event fields. Automatically deduces value type.
TraceLoggingWrite Emits an event.
TraceLoggingWriteActivity Emits an event with specific activity IDs.
TraceLoggingWriteStart Starts an activity and logs the start event.
TraceLoggingWriteStop Stops an activity and logs the stop event.
TraceLoggingWriteTagged Logs an event with an associated ETW activity id.