TextWriterEventListener Class

Definition

Event listener that writes logs to a file or a fileStream provided by user.

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

Constructors

TextWriterEventListener()

Initializes a new instance of TextWriterEventListener that writes logs to text file.

TextWriterEventListener(StreamWriter)

Initializes a new instance of TextWriterEventListener that writes logs to text file.

TextWriterEventListener(String)

Initializes a new instance of TextWriterEventListener that writes logs to text file.

Fields

DefaultLogFileName

Name of the default log file, excluding its path.

Methods

Dispose()

Releases all resources used by the current instance of the TextWriterEventListener class.

OnEventWritten(EventWrittenEventArgs)

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

Applies to