[logback-user] Can't set level

Ceki Gulcu ceki at qos.ch
Fri Jul 10 21:12:23 CEST 2009


Hello Neale,

The configuration file looks correct. How is the level attribute ignored? Which 
version of logback are you using?

Best regards,

Neale Upstone wrote:
> Hi,
>  
> I've been trying the examples at 
> http://logback.qos.ch/manual/configuration.html and the level attribute 
> is always ignored.
>  
> i.e. the following should ensure that I only get error messages logged:
>  
> <configuration>
> 
>   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
>     <layout class="ch.qos.logback.classic.PatternLayout">
>       <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - 
> %msg%n</Pattern>
>     </layout>
>   </appender>
> 
>   <root level="error">
>     <appender-ref ref="STDOUT" />
>   </root>
> </configuration>
>  
> This is quite frustrating, especially as there is no DTD (which would 
> also provide documentation and the ability to edit config files 
> confidently in an XML editor, as is simple with Spring configs).
>  
> Can anyone help.
>  
> Cheers,
> 
> Neale
> 
-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the Logback-user mailing list