Configuration tool changes order of trace listeners

Topics: Logging Application Block
Mar 14, 2008 at 12:49 PM
Edited Mar 14, 2008 at 1:05 PM
Hi All,

Say, is there a good reason why the EntLib Configuration Tool automatically changes the sort order of the trace listeners referenced in the logging categories based on the trace listeners' names?

Here's an excerpt from my app.config file:
<add switchValue="All" name="Error">
<add name="A FlatFile Errors" />
<add name="EventLog Error" />

If I don't put "A" in front of the flat file listener, the next time I open my configuration file with the Config Tool and save it, the EventLog listener jumps on top of the flat file listener.

It does not look like a big problem, but I suspect that my EventLog listener crashes sometimes and then the problem appears neither in the event log nor in the error file.
So I'd like to keep my flat file listener first in the chain of listeners called by the Logging Application Block and at least record the error in the file.

Mar 21, 2008 at 3:04 PM
Hi Alex,

Sorting child nodes is the default behavior, and in this case this default has not been overriden. It probably should, since order makes a difference in some cases.