Can anyone explain why DbgView misses some of my trace writes ?
I'm using the Enterprise Library 5.0 logging block with a trace listener deriving from the EntLib CustomTraceListener
, as below ...
[ConfigurationElementType(typeof(CustomTraceListenerData))]
public class DebugTraceListener : CustomTraceListener
{
public override void Write(string message)
{
Debug.Write(message);
}
public override void WriteLine(string message)
{
Debug.WriteLine(message);
}
public override void TraceData(TraceEventCache eventCache, string source,
TraceEventType eventType, int id, object data)
{
if (data is LogEntry && Formatter != null)
{
WriteLine(Formatter.Format(data as LogEntry));
}
else
{
WriteLine(data.ToString());
}
}
}
I can see all the trace in both the Resharper test runner in VS2010, and in the NUnit GUI tester.
I can also send the trace to a flat file listener and this captures all the trace writes, BUT when I use DbgView (and also TraceSpy) only some of the trace is being shown.
The other wrinkle is I'm using PostSharp to add the logging as an aspect, via attribute, rather than directly in the business code