Table of Contents

Class XmlTraceListener

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners
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 TraceEventCache

The context information provided by System.Diagnostics.

source string

The name of the trace source that delivered the trace data.

eventType TraceEventType

The type of event.

id int

The ID of the event.

data object

The data to trace.