[slf4j-user] Question about strange Logback Logger implementation
Ceki Gülcü
listid at qos.ch
Mon Apr 2 22:17:22 CEST 2007
Hi Pavel,
This is actually a bug in logback. It was fixed a few minutes ago. The
corrected code is availale in logback version 0.9.5.
Thank you for your accurate description of the problem,
At 03:36 PM 4/2/2007, you wrote:
>Hi,
>
>I have question about ch.qos.logback.classic.Logger#isXXXEnable() methods
>implementations, it seems that for FilterReply.NEUTRAL decision, it simply
>always return false if effective level is above DEBUG level.
>
>public boolean isInfoEnabled() {
> FilterReply decision = callTurboFilters(Level.INFO);
> if (decision == FilterReply.NEUTRAL) {
> return effectiveLevelInt <= Level.DEBUG_INT; // always false,
> same for isErrorEnabled()
> } else if (decision == FilterReply.DENY) {
> return false;
> } else if (decision == FilterReply.ACCEPT) {
> return true;
> } else {
> throw new IllegalStateException("Unknown FilterReply value: " +
> decision);
> }
> }
>
>This implementations causes, that configuration below do not print INFO
>messages:
>
><configuration>
>
> <!--====================================================================
> appenders
> =====================================================================-->
>
> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
> <layout class="ch.qos.logback.classic.PatternLayout">
> <Pattern>%d{HH:mm:ss.SSS} - [%thread] [%c:%line] %-5level -
> %msg %n</Pattern>
> </layout>
> </appender>
>
> <!--====================================================================
> loggers
> =====================================================================-->
>
> <logger name="org.apache">
> <level value="INFO"/>
> </logger>
>
> <logger name="org.springframework">
> <level value="INFO"/>
> </logger>
>
> <!--====================================================================
> root logger
> =====================================================================-->
>
> <root>
> <level value="INFO" />
> <appender-ref ref="STDOUT"/>
> </root>
>
></configuration>
>_______________________________________________
>user mailing list
>user at slf4j.org
>http://www.slf4j.org/mailman/listinfo/user
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the slf4j-user
mailing list