Reputation: 6059
In log4j.xml
one can specifiy a certain log level that is applied:
<logger name="com.foo.bar.FooBar"
additivity="false">
<level value="DEBUG" />
<appender-ref ref="myCustomAppender" />
</logger>
Does a log level include other log levels? I'd like so see both debug and error messages. Does the log level DEBUG include ERROR? Or vice versa?
Or does DEBUG only include TRACE and DEBUG, such that:
OFF > TRACE > DEBUG > INFO > WARN > ERROR > ALL
Upvotes: 3
Views: 6073
Reputation: 86
Yes, as you've mentioned in your post all the log levels to the right are included. Unless of course its turned off, no messages will be logged.
Not vice versa though, if you log4j.xml set level value to ERROR, nothing on its left will be logged, only to the right. Ex. Log level of ERROR doesn't include WARN/INFO/DEBUG...., similarly log level of DEBUG will not have TRACE messages.
Upvotes: 2