LoggingActivity LoggingActivity LoggingActivity LoggingActivity LoggingActivity Class

Definition

Creates Event Tracing for Windows (ETW) events that mark the start and end of a group of related events.

public : sealed class LoggingActivity : ILoggingActivity, ILoggingActivity2, ILoggingTarget, IClosable
struct winrt::Windows::Foundation::Diagnostics::LoggingActivity : ILoggingActivity, ILoggingActivity2, ILoggingTarget, IClosable
public sealed class LoggingActivity : ILoggingActivity, ILoggingActivity2, ILoggingTarget, IDisposable
Public NotInheritable Class LoggingActivity Implements ILoggingActivity, ILoggingActivity2, ILoggingTarget, IDisposable
var loggingActivity = new loggingActivity(activityName, loggingChannel);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Windows 10 The LoggingActivity class has been extended in the following ways:+ Now implements ILoggingTarget which provides activity start and stop methods that provide control over the format and contents of the Start and Stop events.

  • Now implements methods to log events. Events are automatically tagged with the LoggingActivity's GUID.
  • Activities can be nested. Every LoggingActivity object is attached to a LoggingChannel object. All events created by the LoggingActivity object are written through the attached LoggingChannel object.

Constructors

LoggingActivity(String, ILoggingChannel) LoggingActivity(String, ILoggingChannel) LoggingActivity(String, ILoggingChannel) LoggingActivity(String, ILoggingChannel) LoggingActivity(String, ILoggingChannel)

Initializes a new instance of the LoggingActivity class for the specified LoggingChannel in Windows 8.1 compatibility mode.

LoggingActivity(String, ILoggingChannel, LoggingLevel) LoggingActivity(String, ILoggingChannel, LoggingLevel) LoggingActivity(String, ILoggingChannel, LoggingLevel) LoggingActivity(String, ILoggingChannel, LoggingLevel) LoggingActivity(String, ILoggingChannel, LoggingLevel)

Initializes a new instance of the LoggingActivity class for the specified LoggingChannel and LoggingLevel in Windows 8.1 compatibility mode.

Properties

Channel Channel Channel Channel Channel

Returns the channel associated with this activity.

Id Id Id Id Id

Gets the identifier for the current logging activity.

Name Name Name Name Name

Gets the name of the current logging activity.

Methods

Close() Close() Close() Close() Close()

Ends the current logging activity.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

IsEnabled() IsEnabled() IsEnabled() IsEnabled() IsEnabled()

Indicates whether at least one session is listening for events from the channel associated with this activity.

IsEnabled(LoggingLevel) IsEnabled(LoggingLevel) IsEnabled(LoggingLevel) IsEnabled(LoggingLevel) IsEnabled(LoggingLevel)

Indicates whether at least one session is listening for events with the specified event severity level from the channel associated with this activity.

IsEnabled(LoggingLevel, Int64) IsEnabled(LoggingLevel, Int64) IsEnabled(LoggingLevel, Int64) IsEnabled(LoggingLevel, Int64) IsEnabled(LoggingLevel, Int64)

Indicates whether at least one session is listening for events with the specified level and keywords from the channel associated with this activity.

LogEvent(String) LogEvent(String) LogEvent(String) LogEvent(String) LogEvent(String)

Logs an event with the specified name.

LogEvent(String, LoggingFields) LogEvent(String, LoggingFields) LogEvent(String, LoggingFields) LogEvent(String, LoggingFields) LogEvent(String, LoggingFields)

Logs an event with the specified name and fields.

LogEvent(String, LoggingFields, LoggingLevel) LogEvent(String, LoggingFields, LoggingLevel) LogEvent(String, LoggingFields, LoggingLevel) LogEvent(String, LoggingFields, LoggingLevel) LogEvent(String, LoggingFields, LoggingLevel)

Logs an event with the specified name, fields, and level.

LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions) LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions) LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions) LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions) LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions)

Logs an event with the specified name, fields, level, and options.

StartActivity(String) StartActivity(String) StartActivity(String) StartActivity(String) StartActivity(String)

Writes an activity start event and creates a LoggingActivity object.

StartActivity(String, LoggingFields) StartActivity(String, LoggingFields) StartActivity(String, LoggingFields) StartActivity(String, LoggingFields) StartActivity(String, LoggingFields)

Writes an activity start event with fields and creates a LoggingActivity object.

StartActivity(String, LoggingFields, LoggingLevel) StartActivity(String, LoggingFields, LoggingLevel) StartActivity(String, LoggingFields, LoggingLevel) StartActivity(String, LoggingFields, LoggingLevel) StartActivity(String, LoggingFields, LoggingLevel)

Writes an activity start event with the specified fields and level and creates a LoggingActivity object.

StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions) StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions) StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions) StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions) StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions)

Writes an activity start event with the specified fields, level, and options, and creates a LoggingActivity object.

StopActivity(String) StopActivity(String) StopActivity(String) StopActivity(String) StopActivity(String)

Marks the activity as closed/disposed and generates a stop event with the specified event name.

StopActivity(String, LoggingFields) StopActivity(String, LoggingFields) StopActivity(String, LoggingFields) StopActivity(String, LoggingFields) StopActivity(String, LoggingFields)

Marks the activity as closed/disposed and generates a stop event with the specified event name and fields.

StopActivity(String, LoggingFields, LoggingOptions) StopActivity(String, LoggingFields, LoggingOptions) StopActivity(String, LoggingFields, LoggingOptions) StopActivity(String, LoggingFields, LoggingOptions) StopActivity(String, LoggingFields, LoggingOptions)

Marks the activity as closed/disposed and generates a stop event with the specified event name, fields, and options.

See Also