Clarification on TraceSource/Trace


  • I've been going back forth through the documentation and web searches, and haven't found a concise description of this stuff and hope someone can help me sort out the knots I've developed in my brain.

    From what I can tell, the tracesource class essentially replaces the traditional Trace class.  If I add a listener to the trace section of my config file, I receive all the trace information to that listener (ie, calls to trace.write, trace.traceerror, etc...).  If that same listener is moved into the sources section under a source definition, I don't receive any of the trace information sent via calls to trace.write, etc.  I have to make calls directly to that trace source via something like 
        TraceSource t = new TraceSource("Source Name");
    Is there not a way to receive calls to the normal Trace functions via a TraceSource object?  Or do you have to make explicit calls via instantiation of a TraceSource object?

    My second question is about the filter setting.  What does the TraceSource compare with its filter?  In the only example I can find in the documentation, it looks like its related to the function name or either the name of the TraceSource object, neither of which really makes any sense.

    I hope this makes sense to someone else...  I've got me head so wrapped around I'm not sure which way is up anymore.

    Wednesday, April 05, 2006 7:10 PM