UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NL:traceloggingactivity.TraceLoggingThreadActivity |
TraceLoggingThreadActivity (traceloggingactivity.h) |
Provides support for logging ETW events during an activity. Events will be automatically tagged with or nested in this activity. |
|
tracelogging\traceloggingthreadactivity.htm |
tracelogging |
7666A28B-42B2-473F-852F-BD3F6CAA6AC7 |
12/05/2018 |
TraceLoggingThreadActivity, TraceLoggingThreadActivity class, tracelogging.traceloggingthreadactivity, traceloggingactivity/TraceLoggingThreadActivity |
traceloggingactivity.h |
Windows |
Windows Vista [desktop apps only] |
Windows Server 2012 R2 [desktop apps only] |
Windows |
19H1 |
|
|
|
|
|
|
Provides support for logging ETW events during an activity. Events will be automatically tagged with or nested in this activity.
This class works by setting a per-thread variable. Only events occurring on the active thread will be automatically tagged.
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 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 tracing is turned on and the activity is started.
Any active threads will be automatically nested in this instance when you start logging with a TraceLoggingThreadActivity object. In addition, all events will be automatically logged with this object's unique identifier.
Important
Only use this class when you can guarantee that all activities for this thread are fully nested. You must ensure that no child activity will outlast a parent activity, even in error cases or edge cases.
Note
In DEBUG builds, the class will raise an assertion during its Stop event, if it detects incorrect activity nesting, or if the Stop event occurs on a thread other than the thread used to start it.
This class is not available for store applications.