Details
-
Bug
-
Resolution: Not a bug
-
Major
-
None
-
1.1.9
-
None
-
Windows 7 x64
Tomcat 8.5.7 x64
Java 8
Description
when you put
logback-access-1.1.9.jar
logback-classic-1.1.9.jar
logback-core-1.1.9.jar
slf4j-api-1.7.22.jar
into the tomcat /lib
then
in the server.xml use
<Valve className="ch.qos.logback.access.tomcat.LogbackValve" />
add logback-access.xml in the /conf
ok the LogbackValve is useful but the webapp who use logback which has it's own logback.xml will be useless.
in the logback.xml if you set
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d
[%thread] %-5level %n%msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.springframework" level="warn" additivity="false">
<appender-ref ref="STDOUT"/>
</logger>
<logger name="org.mongodb.driver" level="warn" additivity="false">
<appender-ref ref="STDOUT"/>
</logger>
the level="warn" is useless, the spring and mongodb log with the debug level will be see.
maybe you will tell me to put logback.xml in the tomcat /lib directry. but I will say no. every webapp can has it's own log logic and be independent of each other is what the Java EE hoped.
so I think this is a bug of logback not a Improvement.