Class FormattedEventLogTraceListener
- 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
EventLogThe 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
EventLogThe event log for the wrapped listener.
formatter
ILogFormatterThe 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
stringThe 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
stringThe source name for the wrapped listener.
formatter
ILogFormatterThe 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
stringThe source name for the wrapped listener.
log
stringThe name of the event log.
formatter
ILogFormatterThe 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
stringThe source name for the wrapped listener.
log
stringThe name of the event log.
machineName
stringThe machine name for the event log.
formatter
ILogFormatterThe formatter for the wrapper.
Fields
DefaultLogName
Default to use when no log name is provided.
public const string DefaultLogName = ""
Field Value
DefaultMachineName
Default to use when no machine name is provided.
public const string DefaultMachineName = "."