greenoldman
greenoldman

Reputation: 21062

Is it possible to configure log4net to make notification on error?

I rephrased the question to avoid focusing on C# exception as an exception.

By design log4net is silent utility, or as FAQ describes it as fail-stop system.

However such behaviour is opposite to what I need. And I need this:

and so on and on.

So is it possible (and if yes, how?) to configure log4net to make a notification on error instead of silently ignoring it?

Upvotes: 2

Views: 942

Answers (1)

L-Four
L-Four

Reputation: 13531

Are you talking about log4net internal debugging?

You can enable this as described here: http://logging.apache.org/log4net/release/faq.html#trouble-file-perm.

This will make sure that inernal log4net exceptions are logged too.

EDIT Can log4net throw exceptions at run time? No. log4net is not reliable. It is a best-effort and fail-stop logging system. By fail-stop, we mean that log4net will not throw unexpected exceptions at run-time potentially causing your application to crash. See http://logging.apache.org/log4net/release/faq.html.

Upvotes: 1

Related Questions