I am using C# System.Diagnostics.TextWriterTraceListener
to print trace. But the trace file becomes too large (hundreds of MBs).
I want to change the behavior of TextWriterTraceListener
, that if the trace file becomes large, it writes output to another file.
For example, the original trace file is 'output1.txt', if it becomes larger than 100MB, then TextWriterTraceListener should write to 'output2.txt'.
Have you encountereds similar problems? Are there any elegant solutions?