TraceListener

Classes derived from the abstract class TraceListener represent destinations for the diagnostic output. The TextWriterTraceListener is designed to direct output to a TextWriter, Stream, or FileStream. Console.Out is an example of a commonly used output stream. The EventLogTraceListener class allows you to send output to an EventLog. You can create your own event logs with the EventLog's static method CreateEventSource. The DefaultTraceListener sends output to the debugging output window. Default Debug output can be viewed in Visual Studio .NET's Output window or with utilities (such as DBMon). You can customize where output appears by implementing your own class derived from TraceListener.

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.