Table of Contents

Class FormattedEventLogTraceListener

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

FormattedEventLogTraceListener is a TraceListener that wraps an FormattedEventLogTraceListener and uses a ILogFormatter to transform the data to trace.

public class FormattedEventLogTraceListener : FormattedTraceListenerWrapperBase, IDisposable
Inheritance
FormattedEventLogTraceListener
Implements
Inherited Members

Constructors

FormattedEventLogTraceListener(EventLog)

Initializes a new instance of FormattedEventLogTraceListener with a System.Diagnostics.EventLogTraceListener initialized with System.Diagnostics.EventLog.

public FormattedEventLogTraceListener(EventLog eventLog)

Parameters

eventLog EventLog

The event log for the wrapped listener.

FormattedEventLogTraceListener(EventLog, ILogFormatter)

Initializes a new instance of FormattedEventLogTraceListener with an ILogFormatter and a System.Diagnostics.EventLogTraceListener initialized with System.Diagnostics.EventLog.

public FormattedEventLogTraceListener(EventLog eventLog, ILogFormatter formatter)

Parameters

eventLog EventLog

The event log for the wrapped listener.

formatter ILogFormatter

The formatter for the wrapper.

FormattedEventLogTraceListener(string)

Initializes a new instance of FormattedEventLogTraceListener with a System.Diagnostics.EventLogTraceListener initialized with a source name.

public FormattedEventLogTraceListener(string source)

Parameters

source string

The source name for the wrapped listener.

FormattedEventLogTraceListener(string, ILogFormatter)

Initializes a new instance of FormattedEventLogTraceListener with an ILogFormatter and a System.Diagnostics.EventLogTraceListener initialized with source name and default log and machine names.

public FormattedEventLogTraceListener(string source, ILogFormatter formatter)

Parameters

source string

The source name for the wrapped listener.

formatter ILogFormatter

The formatter for the wrapper.

FormattedEventLogTraceListener(string, string, ILogFormatter)

Initializes a new instance of FormattedEventLogTraceListener with an ILogFormatter and a System.Diagnostics.EventLogTraceListener initialized with source name.

public FormattedEventLogTraceListener(string source, string log, ILogFormatter formatter)

Parameters

source string

The source name for the wrapped listener.

log string

The name of the event log.

formatter ILogFormatter

The formatter for the wrapper.

FormattedEventLogTraceListener(string, string, string, ILogFormatter)

Initializes a new instance of FormattedEventLogTraceListener with an ILogFormatter and a System.Diagnostics.EventLogTraceListener

public FormattedEventLogTraceListener(string source, string log, string machineName, ILogFormatter formatter)

Parameters

source string

The source name for the wrapped listener.

log string

The name of the event log.

machineName string

The machine name for the event log.

formatter ILogFormatter

The formatter for the wrapper.

Fields

DefaultLogName

Default to use when no log name is provided.

public const string DefaultLogName = ""

Field Value

string

DefaultMachineName

Default to use when no machine name is provided.

public const string DefaultMachineName = "."

Field Value

string