Basically, I would like to be able to log events such as "HTTP timeouts" in my application only if they happen more than 100 times per minute (for example).
Is there any way to configure log4net to handle such a task?
Thanks in advance,
No, you cannot configure it to behave that way.
But, you can achieve this fairly easily by writing your own, custom Appender. Simply inherit from AppenderSkeleton, and override the Append method with your own logic (passing the event parameter to the base implementation as needed).
Any public property in your class can will be automatically loaded by log4net from the configuration file, so you can also specify the threshold rate this way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With