Home Change where Trace.WriteLine() is sent in a console application
Reply: 0

Change where Trace.WriteLine() is sent in a console application

user680
1#
user680 Published in June 21, 2018, 1:01 am

I have a console application that uses an assembly that I cannot modify. Said assembly has a conditional define to output debug data via Trace.WriteLine() when the configuration of the application is Debug.

Now in my console application this means that I get heaps of data output to the console window which I don't want.

So is there anything I can do in my console application (I still want to build and run it with Debug configuration) so that I can redirect the output of those Trace.WriteLine() elsewhere when running with a Debug configuration? Say to a text file?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.303144 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO