1

is there a way to trigger alerts when log4net stops logging?if so, how?

Baski
  • 829
  • 8
  • 14

1 Answers1

2

Log4net provides the IErrorHandler interface that would allow you to do something if an appender fails. The default implementation writes the first error to the internal logging system but then remains silent. You could easily implement a different behavior but you should be careful that your error handler does not make your application stop working because logging fails.

Not directly an answer to your question but you might find it useful to know that the AdoNetAppender can be configured to reconnect if there is a failure.

Community
  • 1
  • 1
Stefan Egli
  • 17,398
  • 3
  • 54
  • 75