Sets the collection of listeners that is monitoring the trace output.
Parameters
listeners
A listener_collection that represents a collection of type trace_listener monitoring the trace output.
Remarks
The listeners produce formatted output from the trace output. By default, the collection contains an instance of the default_trace_listener class. If you want to remove the default listener, call the Remove method, and pass it the instance of the default_trace_listener. To redirect output to the console window, add an instance of the console_trace_listener class.
Note
The Listeners collection is shared by both the Debug and the Trace classes; adding a trace listener to either class adds the listener to both.