System.Diagnostic.Trace.WriteLine Listener, per thread

611 views Asked by At

I have a windows service which executes multiple threads to work things on.

At the same time, I use Trace listeners to collect some logging information. all works fine. But the main issue is, logging information (trace.writeline) is shared between all threads. So if something is written in one thread, it is visible and collected by all threads running at that time.

Is there a way that I can limit the trace listener to listen to currently thread only and not its sibling threads?

Using .NET framework 3.5 on Visual Studio 2008

thanks Sameers

0

There are 0 answers