Hidden Jewels Log4Net?

I am curious if anyone has a chance with Log4Net (in particular, the C # library) to share what they consider to be the most useful features that might arise for someone who is not familiar with the library, or misunderstood.

+5
source share
2 answers

There are more levels than those displayed by helper methods ( ILog.Debug, ILog.Fataletc.) of the interface ILog. For log4net version 1.2.10.0, you have the following levels and associated clipping values ​​used to filter messages in the registrar configuration:

OFF: 2147483647
EMERGENCY: 120000
FATAL: 110000
ALERT: 100000
CRITICAL: 90000
SEVERE: 80000
ERROR: 70000
WARN: 60000
NOTICE: 50000
INFO: 40000
DEBUG: 30000
FINE: 30000
TRACE: 20000
FINER: 20000
VERBOSE: 10000
FINEST: 10000
ALL: -2147483648

, Log ILog:

Log.Logger.Log(null, log4net.Core.Level.Emergency, "Help!", null);
+1

( ). (, , , ).

+3

All Articles