I am developing and testing a WCF service hosted in Windows Service (VS2008, WinXP Pro SP3, Framework 3.5). I am using TextWriterTraceListener to output debugging info to a text file. Here is my config setting:
<trace autoflush="false" indentsize="4">
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\ServiceLog.txt"></add>
The problem I am having is that it is not writing to text file in realtime and keeps debugging data in the buffer until it is full. It does not flush out even if I stop the service. This is stopping me from debugging the service.
Should I set autoflush="true" in config file? Are there any considerations in this regard? I vaguely remember reading about this switch that was not in favor of setting it on.
View Complete Post