August 2003
Intermediate to advanced
928 pages
32h 1m
English
EventLogTraceListener
To capture trace and debug
output to an
EventLog, add an instance of this class to
Debug.Listeners, or
Trace.Listeners. You can specify an
EventLog instance in the constructor or the name
of an event source as a string.
public sealed class EventLogTraceListener : TraceListener { // Public Constructors public EventLogTraceListener( ); public EventLogTraceListener(EventLogeventLog); public EventLogTraceListener(stringsource); // Public Instance Properties public EventLog EventLog{set; get; } public override string Name{set; get; } // overrides TraceListener // Public Instance Methods public override void Close( ); // overrides TraceListener public override void Write(stringmessage); // overrides TraceListener public override void WriteLine(stringmessage); // overrides TraceListener // Protected Instance Methods protected override void Dispose(booldisposing); // overrides TraceListener }
System.Object
→
System.MarshalByRefObject
→
TraceListener(System.IDisposable)
→
EventLogTraceListener