Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 2.94 KB

loggingactivity_loggingactivity_2127380504.md

File metadata and controls

38 lines (28 loc) · 2.94 KB
-api-id -api-type
M:Windows.Foundation.Diagnostics.LoggingActivity.#ctor(System.String,Windows.Foundation.Diagnostics.ILoggingChannel)
winrt method

Windows.Foundation.Diagnostics.LoggingActivity.LoggingActivity

-description

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

-parameters

-param activityName

The name of the logging activity.

-param loggingChannel

The logging channel.

-remarks

Windows 10 Two modes of operation are now supported: Windows 8.1 compatibility mode and the new behavior supported by Windows 10 and later.+ For Windows 8.1 compatibility mode, create the object using a constructor.

The differences between these two modes are:

Windows 8.1 compatibility mode Windows 10 and later specific behavior
The start event generated by the constructor is formatted for compatibility with the manifest used by LoggingChannel. The start event name is hard-coded as "LogActivityStart" + Level. The event will be a manifest-based event or a self-describing event depending on the operating mode of the underlying channel. The start event generated by the StartActivity method follows the conventions of LoggingChannel.LogEvent and will always use a self-describing, i.e. not manifest-based, event encoding. The event name is based on the startEventName parameter.
The stop event generated by Close() or Dispose() is formatted for compatibility with the manifest used by LoggingChannel. The stop event name is hard-coded as "LogActivityStop" + Level. The event will be a manifest-based event or a self-describing event, depending on the operating mode of the underlying channel. The Stop event generated by Close() or Dispose() will follow the conventions of LoggingChannel.LogEvent and will use the self-describing event encoding. The activity name will be used as the stop event name.
The destructor/finalizer will invoke Close(). The destructor/finalizer will not invoke Close().

-examples

-see-also

LoggingActivity(String, ILoggingChannel, LoggingLevel), LoggingChannel, StartActivity