Skip to main content

Default Listeners

There are a number of default listeners already provided with the basic .NET Framework that can be used to log the diagnostics traces coming from the PPJ Framework and the application.

You can also write your own listener by deriving from System.Diagnostics.TraceListener. A custom listener would allow you to capture only specific events and process the information however you like. Some examples can be storing the trace logs in a database, send emails, log them on a remote system and more.

The most useful default listeners provided in the basic .NET Framework are listed in the following table:

ListenerDescription
DefaultTraceListenerLogs traces to the output window in VisualStudio.
TextWriterTraceListenerLogs traces to a text file.
ConsoleTraceListenerLogs traces to the console window.
DelimitedListTraceListenerLogs traces to a delimited text file. The default delimiter is ",".
XmlWriterTraceListenerLogs traces to a XML formatted text file.
EventLogTraceListenerLogs traces to Windows' event log.
FormViewerTraceListenerLogs traces to a form viewer. This listener is added as part of the new PPJ.Utility namespace.