Condividi tramite


AzureEventSourceListener Class

Definition

Implementation of EventListener that listens to events produced by Azure SDK client libraries.

public class AzureEventSourceListener : System.Diagnostics.Tracing.EventListener
type AzureEventSourceListener = class
    inherit EventListener
Public Class AzureEventSourceListener
Inherits EventListener
Inheritance
AzureEventSourceListener

Constructors

AzureEventSourceListener(Action<EventWrittenEventArgs,String>, EventLevel)

Creates an instance of AzureEventSourceListener that executes a log callback every time event is written.

AzureEventSourceListener(Action<EventWrittenEventArgs>, EventLevel)

Creates an instance of AzureEventSourceListener that executes a log callback every time event is written.

Fields

TraitName

The trait name that has to be present on all event sources collected by this listener.

TraitValue

The trait value that has to be present on all event sources collected by this listener.

Methods

CreateConsoleLogger(EventLevel)

Creates a new instance of AzureEventSourceListener that forwards events to WriteLine(String).

CreateTraceLogger(EventLevel)

Creates a new instance of AzureEventSourceListener that forwards events to WriteLine(Object).

OnEventSourceCreated(EventSource)

Called for all existing event sources when the event listener is created and when a new event source is attached to the listener.

OnEventWritten(EventWrittenEventArgs)

Called whenever an event has been written by an event source for which the event listener has enabled events.

Applies to