How do I configure logback not to log messages from loggers in package org.package and it's subpackages unless their level is WARN or ERROR?
Asked
Active
Viewed 2.0k times
2 Answers
37
And why isn't the following configuration not working for you?
<configuration>
<logger name="org.package" level="WARN"/>
<root level="ALL">
<appender class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{ISO8601} | %-5level | %thread | %logger{1} | %m%n</pattern>
</encoder>
</appender>
</root>
</configuration>

Tomasz Nurkiewicz
- 334,321
- 69
- 703
- 674
-
BTW, what does "%d{ISO8601}" mean? – Vladislav Rastrusny May 09 '11 at 08:51
-
1*ISO8601* is a standardized date format, see: http://logback.qos.ch/manual/layouts.html – Tomasz Nurkiewicz May 09 '11 at 13:16