trace-listener

Formatting trace output

I'm using TextWriterTraceListener to log diagnostics messages to a text file. However I wan't also to log a timestamp of every trace message added. Is it possible to define a kind of formatter for the listener that would automatically add timestamps? Currently I'm adding timestamps manually on every Trace.WriteLine() call but this isn't...

How to define custom TraceListener in app.config

I have implemented a custom trace listener (derived from TextWriteTraceListener) and now I would like to set my application to use it instead of standard TextWriteTraceListener. First I added default TextWriteTraceListener in order to make sure it works ok and it does. Here's my app.config: <configuration> <system.diagnostics> ...

TextWriterTraceListener and trace filenames with GUIDs

I use TextWriterTraceListener (System.Diagnostics) in my application to trace several things like exceptions,... The application is running on a terminal server and if there are many users using it simultaneously the listener starts to create many tracefiles with random GUIDs in the filename. Are there possibilities or workarounds to ...