Logging blocks - Problem in logging to multiple destinations

Topics: Logging Application Block
Mar 26, 2010 at 4:33 PM


I have configured the enterprise library logging blocks to log the messages into event log and custom log table. For this I configured two listeners (one is for event log and other is custom database trace listener). I deployed my application and started running it. For some days it worked fine without any problems. I can see the messages getting logged into the event log and custom log table.

But today I observed one problem in the logging. The windows event viewer has some size limitation to the "Application" event source. Today it got exeeded so it is not logging any information in the windows event log.

At the same I observed that it is not logging to the custom log table also.

Actually it should log to the custom log table even though the event log listener failed to write the messages to the event logs.

Is it a general problem or Am I missing some configuration here?

Please guide me to solve this problem.

Thanks in advance.



Mar 27, 2010 at 12:39 PM

The thing that could happen here is that, when the event log is full, it may have thrown an exception and due to that, the next destination will have also fail. Anyway, to confirm this one. You can add a flat file trace listener/rolling flat file to the Logging Errors & Warnings section of the logging application block to see if there is an error reported due to the full event log. If there will be an error. One thing you can do with the event log, is to increase the maximum log size and change the appropriate behavior of what the event log will do if it reached the maximum log size.