TraceLoggingEventTag macro (traceloggingprovider.h)

TraceLogging wrapper macro that sets the event tag for the event.

Syntax

void TraceLoggingEventTag(
  [in]  eventTag
);

Parameters

[in] eventTag

This is a compile-time constant specifying the event tag value.

In C++, this can be any value in the range 0 through 0x0FFFFFFF.

In C, this can be any value in the range 0 through 0x0FFFA000 with the low 14 bits set to 0.

Return value

None

Remarks

TraceLoggingEventTag(eventTag) can be used as a parameter to an invocation of a TraceLoggingWrite macro to set the event's tag.

The semantics of the tag are defined by the event consumer. During event processing, the tag value can be retrieved from the TRACE_EVENT_INFO Tags field.

The TraceLogging schema convention encodes tags as 28-bit field by using a chain of up to four bytes with the upper-most bit used as a 'chain' bit (4 bytes * 7 usable bits per byte = 28 bits). Data is encoded most-significant byte first. In C, TraceLoggingWrite is limited to a 2-byte encoding for the tag, so the low 14 bits of the tag must be 0.

If no TraceLoggingEventTag parameters are provided for an event, no tag is transmitted for the event and the event will have a tag of 0. If multiple TraceLoggingEventTag parameters are provided, the tag values are OR'ed together.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header traceloggingprovider.h

See also

TraceLoggingWrite

TraceLogging wrapper macros

TRACE_EVENT_INFO