Share via


LoggingActivity.StartActivity Method

Definition

Overloads

StartActivity(String)

Writes an activity start event and creates a LoggingActivity object.

StartActivity(String, LoggingFields)

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

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)

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

StartActivity(String)

Writes an activity start event and creates a LoggingActivity object.

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivity")]
LoggingActivity StartActivity(winrt::hstring const& startEventName);
[Windows.Foundation.Metadata.Overload("StartActivity")]
public LoggingActivity StartActivity(string startEventName);
function startActivity(startEventName)
Public Function StartActivity (startEventName As String) As LoggingActivity

Parameters

startEventName
String

Platform::String

winrt::hstring

The name for the start event.

Returns

An object the represents the new activity.

Implements

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring)
Attributes

See also

Applies to

StartActivity(String, LoggingFields)

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

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFields")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields);
[Windows.Foundation.Metadata.Overload("StartActivityWithFields")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields);
function startActivity(startEventName, fields)
Public Function StartActivity (startEventName As String, fields As LoggingFields) As LoggingActivity

Parameters

startEventName
String

Platform::String

winrt::hstring

The name for the start event.

fields
LoggingFields

The fields for this event.

Returns

An object that represents the new activity.

Implements

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields)
Attributes

Remarks

Methods that accept a LoggingFields parameter also accept null. A null value is semantically equivalent to a newly-constructed or cleared LoggingFields object and represents an empty payload.

See also

Applies to

StartActivity(String, LoggingFields, LoggingLevel)

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

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields, LoggingLevel level) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndLevel")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields, LoggingLevel const& level);
[Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndLevel")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields, LoggingLevel level);
function startActivity(startEventName, fields, level)
Public Function StartActivity (startEventName As String, fields As LoggingFields, level As LoggingLevel) As LoggingActivity

Parameters

startEventName
String

Platform::String

winrt::hstring

The name for the start event.

fields
LoggingFields

The fields for this event. May be **null **.

level
LoggingLevel

The level of detail for this event.

Returns

An object that represents the new activity.

Implements

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel)
Attributes

See also

Applies to

StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions)

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

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields, LoggingLevel level, LoggingOptions ^ options) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndOptions")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields, LoggingLevel const& level, LoggingOptions const& options);
[Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndOptions")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields, LoggingLevel level, LoggingOptions options);
function startActivity(startEventName, fields, level, options)
Public Function StartActivity (startEventName As String, fields As LoggingFields, level As LoggingLevel, options As LoggingOptions) As LoggingActivity

Parameters

startEventName
String

Platform::String

winrt::hstring

The name for this event.

fields
LoggingFields

The fields for this event. May be null.

level
LoggingLevel

The level of detail for this event.

options
LoggingOptions

The options for this event. Pass null to use the default options. The options are for advanced scenarios. The default values are designed to work well for most events.

Returns

An object that represents the new activity.

Implements

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions)
Attributes

Remarks

If you provide options, LoggingOptions.ActivityId, LoggingOptions.RelatedActivityId, and LoggingOptions.Opcode are ignored because the new LoggingActivity object's options will be set as follows:

The RelatedId is set using this LoggingActivity's Id.

The Id is automatically generated.

The opcode is set to LoggingOptions.Opcode.Start

See also

Applies to