[logback-dev] [JIRA] (LOGBACK-1252) logback xml useless when LogbackValve is use in tomcat

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Feb 6 08:02:00 CET 2017

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
into the tomcat /lib

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">
			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %n%msg%n</pattern>

	<root level="info">
		<appender-ref ref="STDOUT"/>

	<logger name="org.springframework" level="warn" additivity="false">
		<appender-ref ref="STDOUT"/>

	<logger name="org.mongodb.driver" level="warn" additivity="false">
		<appender-ref ref="STDOUT"/>
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

More information about the logback-dev mailing list