After making this change, my code
TraceSource ts = new TraceSource("DefaultTraceSource");
ts.TraceEvent (TraceEventType.Error, 1, "test");
works perfectly as intended.
Another catch I found with TraceSource is that the switchName attribute in the source element seems to be got ignored. To define the switch level, it seems better to use the switchValue attribute in the source element directly.
1 comment:
What about through tracing via application configuration?
Post a Comment