finalmachine created LOGBACK-1252: ------------------------------------- Summary: logback xml useless when LogbackValve is use in tomcat Key: LOGBACK-1252 URL: https://jira.qos.ch/browse/LOGBACK-1252 Project: logback Issue Type: Bug Components: logback-access Affects Versions: 1.1.9 Environment: Windows 7 x64 Tomcat 8.5.7 x64 Java 8 Reporter: finalmachine Assignee: Logback dev list
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{HH:mm:ss.SSS} [%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. -- This message was sent by Atlassian JIRA (v6.4.12#64027) _______________________________________________ logback-dev mailing list logback-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-dev