Hi guys:
I don't quite understand what is the mean functionality for root logger as shown in following section. What is the difference from other loggers?
<level value="WARN" />
<appender-ref ref="RollingLogFileAppender" />
</root>
Hi guys:
I don't quite understand what is the mean functionality for root logger as shown in following section. What is the difference from other loggers?
<level value="WARN" />
<appender-ref ref="RollingLogFileAppender" />
</root>
I think the log4net documentation explains this quite nicely (just scroll down to Logger Hierarchy):
Loggers are organized in hierarchies. E.g.: The logger Foo.Bar
is child of the logger Foo
. This way the loggers create a tree and the root logger is simply the root of that tree (in the example Foo is a child of the root logger).
This hiearchy allows for some interesting configuration applications (e.g. disable/enable logging for an entire sub system of your application).