Udostępnij za pośrednictwem


LoggingActivity.LogEvent Method

Definition

Overloads

LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions)

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

LogEvent(String, LoggingFields, LoggingLevel)

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

LogEvent(String, LoggingFields)

Logs an event with the specified name and fields.

LogEvent(String)

Logs an event with the specified name.

LogEvent(String, LoggingFields, LoggingLevel, LoggingOptions)

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

public:
 virtual void LogEvent(Platform::String ^ eventName, LoggingFields ^ fields, LoggingLevel level, LoggingOptions ^ options) = LogEvent;
/// [Windows.Foundation.Metadata.Overload("LogEventWithFieldsAndOptions")]
void LogEvent(winrt::hstring const& eventName, LoggingFields const& fields, LoggingLevel const& level, LoggingOptions const& options);
[Windows.Foundation.Metadata.Overload("LogEventWithFieldsAndOptions")]
public void LogEvent(string eventName, LoggingFields fields, LoggingLevel level, LoggingOptions options);
function logEvent(eventName, fields, level, options)
Public Sub LogEvent (eventName As String, fields As LoggingFields, level As LoggingLevel, options As LoggingOptions)

Parameters

eventName
String

Platform::String

winrt::hstring

The name for this event.

fields
LoggingFields

The fields for this event. May be null.

level
LoggingLevel

The severity level 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.

Implements

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

Remarks

If you provide options,LoggingOptions.ActivityId and LoggingOptions.RelatedActivityId are ignored because the activity object automatically manages these values for the event.

eventName should not be used as a payload field. For example, use LogEvent(“MyEvent”, fieldsWithStringData) instead of LogEvent(stringData).

See also

Applies to

LogEvent(String, LoggingFields, LoggingLevel)

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

public:
 virtual void LogEvent(Platform::String ^ eventName, LoggingFields ^ fields, LoggingLevel level) = LogEvent;
/// [Windows.Foundation.Metadata.Overload("LogEventWithFieldsAndLevel")]
void LogEvent(winrt::hstring const& eventName, LoggingFields const& fields, LoggingLevel const& level);
[Windows.Foundation.Metadata.Overload("LogEventWithFieldsAndLevel")]
public void LogEvent(string eventName, LoggingFields fields, LoggingLevel level);
function logEvent(eventName, fields, level)
Public Sub LogEvent (eventName As String, fields As LoggingFields, level As LoggingLevel)

Parameters

eventName
String

Platform::String

winrt::hstring

The name for this event.

fields
LoggingFields

The fields for this event. May be null.

level
LoggingLevel

The severity level for this event.

Implements

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

See also

Applies to

LogEvent(String, LoggingFields)

Logs an event with the specified name and fields.

public:
 virtual void LogEvent(Platform::String ^ eventName, LoggingFields ^ fields) = LogEvent;
/// [Windows.Foundation.Metadata.Overload("LogEventWithFields")]
void LogEvent(winrt::hstring const& eventName, LoggingFields const& fields);
[Windows.Foundation.Metadata.Overload("LogEventWithFields")]
public void LogEvent(string eventName, LoggingFields fields);
function logEvent(eventName, fields)
Public Sub LogEvent (eventName As String, fields As LoggingFields)

Parameters

eventName
String

Platform::String

winrt::hstring

The name for this event.

fields
LoggingFields

The fields for this event. May be null.

Implements

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

Remarks

The level is set to LoggingLevel.Verbose.

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

LogEvent(String)

Logs an event with the specified name.

public:
 virtual void LogEvent(Platform::String ^ eventName) = LogEvent;
/// [Windows.Foundation.Metadata.Overload("LogEvent")]
void LogEvent(winrt::hstring const& eventName);
[Windows.Foundation.Metadata.Overload("LogEvent")]
public void LogEvent(string eventName);
function logEvent(eventName)
Public Sub LogEvent (eventName As String)

Parameters

eventName
String

Platform::String

winrt::hstring

The name for this event.

Implements

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

See also

Applies to