Class FormattedTraceListenerWrapperBase
- Assembly
- Microsoft.Practices.EnterpriseLibrary.Logging.dll
Base class for Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners that wrap other trace listeners and use a ILogFormatter to format the trace information.
public abstract class FormattedTraceListenerWrapperBase : FormattedTraceListenerBase, IDisposable
- Inheritance
-
FormattedTraceListenerWrapperBase
- Implements
- Derived
- Inherited Members
Constructors
FormattedTraceListenerWrapperBase()
Initializes a FormattedTraceListenerWrapperBase.
protected FormattedTraceListenerWrapperBase()
FormattedTraceListenerWrapperBase(TraceListener)
Initializes a FormattedTraceListenerWrapperBase with an inner TraceListener.
protected FormattedTraceListenerWrapperBase(TraceListener innerListener)
Parameters
innerListener
TraceListenerThe wrapped listener.
FormattedTraceListenerWrapperBase(TraceListener, ILogFormatter)
Initializes a FormattedTraceListenerWrapperBase with an inner TraceListener and a ILogFormatter.
protected FormattedTraceListenerWrapperBase(TraceListener innerListener, ILogFormatter formater)
Parameters
innerListener
TraceListenerThe wrapped listener.
formater
ILogFormatterThe formatter.
Properties
InnerListener
Gets the TraceListener wrapped.
public TraceListener InnerListener { get; }
Property Value
- TraceListener
The TraceListener wrapped.
Methods
Dispose(bool)
Deal with resources.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue if called from a Dispose message.
TraceData(TraceEventCache, string, TraceEventType, int, object)
Formats the object to trace and forward the trace request to the wrapped listener with the formatted result.
public override void TraceData(TraceEventCache eventCache, string source, TraceEventType severity, int id, object data)
Parameters
eventCache
TraceEventCacheThe context information.
source
stringThe trace source.
severity
TraceEventTypeThe severity.
id
intThe event id.
data
objectThe object to trace.
Remarks
Formatting is only performed if the object to trace is a LogEntry and the formatter is set.
TraceData(TraceEventCache, string, TraceEventType, int, params object[])
Forwards the trace request to the wrapped listener.
public override void TraceData(TraceEventCache eventCache, string source, TraceEventType severity, int id, params object[] data)
Parameters
eventCache
TraceEventCacheThe context information.
source
stringThe trace source.
severity
TraceEventTypeThe severity.
id
intThe event id.
data
object[]The objects to trace.
TraceEvent(TraceEventCache, string, TraceEventType, int, string)
Forwards the trace request to the wrapped listener.
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType severity, int id, string message)
Parameters
eventCache
TraceEventCacheThe context information.
source
stringThe trace source.
severity
TraceEventTypeThe severity.
id
intThe event id.
message
stringThe message to trace.
TraceEvent(TraceEventCache, string, TraceEventType, int, string, params object[])
Forwards the trace request to the wrapped listener.
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType severity, int id, string format, params object[] args)
Parameters
eventCache
TraceEventCacheThe context information.
source
stringThe trace source.
severity
TraceEventTypeThe severity.
id
intThe event id.
format
stringThe format to use.
args
object[]The objects to trace.
Write(string)
Forwards the trace request to the wrapped listener.
public override void Write(string message)
Parameters
message
stringThe message to trace.
WriteLine(string)
Forwards the tracing to the wrapped listener.
public override void WriteLine(string message)
Parameters
message
stringThe message to trace.