Throttle or limit logging to Event Log

Topics: Logging Application Block
Dec 15, 2008 at 5:31 AM
Does anyone know if it's possible to control the number of logs that goes to the Event Log per minute/hour?

I have logging via a FormattedEventLogTraceListener working nicely. I now need to be able to throttle the logging if possible, and do so via code (as opposed to an OS/system setting).

I have done some reading on MSDN, there is a class that gives you the properties for contextual information related to this area, but I have not found anything that indicates how to setup the config section for such purposes.

Thanks in advance for any useful information.
Dec 15, 2008 at 6:03 AM
I don't think there's a readily configurable property in the Logging Application block that will allow you to do this but you may probably create a CustomFilter that will track the number of logs being written either by creating a counter or via custom code that reads log entries in the Event Log.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Dec 16, 2008 at 3:48 PM
Sorry, not a solution to your problem only a thought - Is the Event Log the correct medium for sustained, high volume logging?

In high volume logging scenarios I prefer to use some other backing medium and keep the Event Log for service/stop/start type messages.

Tony
Intelligent Decisioning Ltd
www.id-crm.com