Class XmlTraceListener
- Assembly
- Microsoft.Practices.EnterpriseLibrary.Logging.dll
Represents a trace listener that writes entries as XML-encoded data to a file.
public class XmlTraceListener : XmlWriterTraceListener, IDisposable
- Inheritance
-
XmlTraceListener
- Implements
- Inherited Members
Constructors
XmlTraceListener(string)
Initializes a new instance of the XmlTraceListener class.
public XmlTraceListener(string filename)
Parameters
filename
string
Methods
TraceData(TraceEventCache, string, TraceEventType, int, object)
Delivers the trace data as an XML message.
public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
Parameters
eventCache
TraceEventCacheThe context information provided by System.Diagnostics.
source
stringThe name of the trace source that delivered the trace data.
eventType
TraceEventTypeThe type of event.
id
intThe ID of the event.
data
objectThe data to trace.