O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

EventLogTraceListener

Synopsis

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 method EventLogTraceListener();  
   public method EventLogTraceListener(EventLog eventLog);  
   public method EventLogTraceListener(string source);  
// Public Instance Properties
   public field EventLog EventLog{set; get; } 
   public override field string Name{set; get; }  // overrides TraceListener
                  // Public Instance Methods
   public override method void Close();           // overrides TraceListener
   public override method void Write(string message);           // overrides TraceListener
   public override method void WriteLine(string message);       // overrides TraceListener
                  // Protected Instance Methods
   protected override method void Dispose(bool disposing);      // overrides TraceListener
}

Hierarchy

System.ObjectSystem.MarshalByRefObjectTraceListener(System.IDisposable)EventLogTraceListener

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required