I am seeing Undefined in the Debug Trace

Aug 26, 2009 at 5:45 AM

Hello,

I like tracerX a lot. I am using it in a BizTalk ESB Solution and so far it works pretty good. I only have one problem with it.

I use DebugView a lot and i think it is one of the best viewers there is. (although yours is pretty good as well). In debugview i am always seeing undefined after the timestamp. I am using your sample configuration from codeproject.

Do you know how to make undefined something usefull ?

 

 

Coordinator
May 5, 2010 at 3:04 PM

This has been fixed in version 4.0. 

The problem was related to the enum type TracerX.TraceLevel.  I had decided to rename TraceLevel.Undefined to TraceLevel.Inherited.  For backwards compatibility, I marked Undefined with the [Obsolete] attribute and added Inherited.  Both have the numeric value 0.  This triggered what I consider a bug in how .NET converts [Flags] enum values to strings.  If any bits of a [Flags] enum value are set, it should ignore the 0 values (like Inherited and Undefined in this case) and not include those names in the rendered string.  Apparently, it only ignores the first 0 value (e.g. Inherited) and includes the names of any other 0 values (e.g. Undefined) when rendering the string.