Skip to content

Latest commit

 

History

History
103 lines (87 loc) · 3.25 KB

nf-traceloggingprovider-traceloggingkeyword.md

File metadata and controls

103 lines (87 loc) · 3.25 KB
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
NF:traceloggingprovider.TraceLoggingKeyword
TraceLoggingKeyword macro (traceloggingprovider.h)
TraceLogging wrapper macro that sets the keyword for the event.
TraceLoggingKeyword
TraceLoggingKeyword macro
tracelogging.traceloggingkeyword
traceloggingprovider/TraceLoggingKeyword
tracelogging\traceloggingkeyword.htm
tracelogging
4837DCE3-929F-458B-95E1-8720FD3E9FFA
06/06/2022
TraceLoggingKeyword, TraceLoggingKeyword macro, tracelogging.traceloggingkeyword, traceloggingprovider/TraceLoggingKeyword
traceloggingprovider.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Windows
19H1
TraceLoggingKeyword
traceloggingprovider/TraceLoggingKeyword
c++
APIRef
kbSyntax
HeaderDef
traceloggingprovider.h
TraceLoggingKeyword

TraceLoggingKeyword macro

-description

TraceLogging wrapper macro that sets the keyword for the event.

-parameters

-param eventKeyword [in]

A 64-bit bitmask used to indicate an event's membership in a set of event categories. This value must be a compile-time constant.

Important

ProviderId, Level and Keyword are the primary means for filtering events. Other kinds of filtering are possible but have much higher overhead. Always assign a meaningful non-zero level and keyword to every event.

See EVENT_DESCRIPTOR for details about the event keyword.

-remarks

TraceLoggingKeyword(eventKeyword) can be used as a parameter to an invocation of a TraceLoggingWrite macro to set the event's keyword. Event keyword is a primary means for filtering events. Always assign a meaningful (non-zero) keyword to every event.

If no TraceLoggingKeyword macros are provided to a TraceLoggingWrite call, the event's default keyword is 0. If multiple TraceLoggingKeyword macros are provided, the values are OR'ed together.

The top 16 bits of the keyword (bitmask 0xFFFF000000000000) are defined by Microsoft. The low 48 bits of the keyword (bitmask 0x0000FFFFFFFFFFFF) are defined by the event provider. For example, the event provider might define bit 0 (bitmask 0x1) to be the "I/O" category, bit 1 (bitmask 0x2) to be the "UI" category, and bit 2 (bitmask 0x4) to be the "performance measurement" category. In this scenario, an event might have its keyword set to 0x5, indicating that the event is in both the "I/O" and "performance measurement" categories.

-see-also

EVENT_DESCRIPTOR

TraceLoggingWrite

TraceLogging wrapper macros