LoggingActivity Constructors

Definition

Overloads

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)

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

LoggingActivity(String, ILoggingChannel)

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

public:
 LoggingActivity(Platform::String ^ activityName, ILoggingChannel ^ loggingChannel);
 LoggingActivity(winrt::hstring const& activityName, ILoggingChannel const& loggingChannel);
public LoggingActivity(string activityName, ILoggingChannel loggingChannel);
function LoggingActivity(activityName, loggingChannel)
Public Sub New (activityName As String, loggingChannel As ILoggingChannel)

Parameters

activityName
String

Platform::String

winrt::hstring

The name of the logging activity.

loggingChannel
ILoggingChannel

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().

See also

Applies to

LoggingActivity(String, ILoggingChannel, LoggingLevel)

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

public:
 LoggingActivity(Platform::String ^ activityName, ILoggingChannel ^ loggingChannel, LoggingLevel level);
 LoggingActivity(winrt::hstring const& activityName, ILoggingChannel const& loggingChannel, LoggingLevel const& level);
public LoggingActivity(string activityName, ILoggingChannel loggingChannel, LoggingLevel level);
function LoggingActivity(activityName, loggingChannel, level)
Public Sub New (activityName As String, loggingChannel As ILoggingChannel, level As LoggingLevel)

Parameters

activityName
String

Platform::String

winrt::hstring

The name of the logging activity.

loggingChannel
ILoggingChannel

The logging channel.

level
LoggingLevel

The logging level.

See also

Applies to