Multiple TraceListener writing to the same log file problem RRS feed

  • Question

  • User829868397 posted

    Hi, I have the following configuration for Ent Lib 3.1:

    1. Exception Policy uses 2 Logging Handlers :

     a - 1st one uses the Category Source, EVENT, that writes to a Event Log using the Event Log Trace Listener

     b - 2nd one uses a Category Source, ERROR, that writes to the Log File using the Flat File Log Trace Listener

    2. One more Category Source, DEBUG, that writes to the same Log File using a different Flat File Log Trace Listener.Different because I want different formats for DEBUG and ERROR messages.

    When the exception policy is triggered, it writes to the event log successfully but instead of writing to the specified Log File, it writes to a new log file - (guid-logfilename).

    I read somewhere that this happens bcoz of multiple trace listener pointing to the same log file.

    But how do I avoid this situation? I need different trace listener because I need to use different formats. And I don't have the option of writing to a separate file.

    Please advise!


    Wednesday, September 17, 2008 4:45 PM

All replies

  • User829868397 posted

    Has anyone seen this problem? Any ideas/suggestions are most welcome.

    Looking forward to hearing from some expert soon!


    Monday, September 22, 2008 10:11 AM