`dcc-release-client` doesn't use conf/logback.xml configuration

The dcc-release-client includes src/main/conf/logback.xml, but this file is not used for logging configuration when you start the release client as “java -jar dcc-release-client-4.2.5-SNAPSHOT.jar”. If you add -Dlog4j.debug to the command line, you’ll see that log4j is the logger, and in my build it is picking up a config from hadoop:

log4j: Using URL [jar:file:/mnt/etl/dcc-release/dcc-release-client-4.2.5-SNAPSHOT.jar!/BOOT-INF/lib/hadoop-core-2.5.0-mr1-cdh5.3.1.jar!/log4j.properties] for automatic log4j configuration.

“mvn dependency:tree | grep log” shows

[INFO] | ± org.springframework.boot:spring-boot-starter-logging:jar:1.1.10.RELEASE:compile
[INFO] | | - org.slf4j:log4j-over-slf4j:jar:1.7.7:compile

Oops, looks like the log4j initialization is irrelevant. I made it load a log4j.xml and it had no effect on the output. Does anyone know how to change the logging config for dcc-release-client?

/dcc-release-client$ mvn dependency:tree | grep “(log)|(slf4j)”
[INFO] | | | - com.esotericsoftware.minlog:minlog:jar:1.2:provided
[INFO] | | ± log4j:log4j:jar:1.2.17:provided
[INFO] | | ± com.typesafe.akka:akka-slf4j_2.10:jar:2.3.11:provided
[INFO] | ± org.springframework.boot:spring-boot-starter-logging:jar:1.1.10.RELEASE:compile
[INFO] | | - org.slf4j:log4j-over-slf4j:jar:1.7.7:compile
[INFO] | | | ± org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.57:compile
[INFO] | | | ± org.jboss.logging:jboss-logging:jar:3.1.1.GA:compile
[INFO] | ± commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | ± org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] ± ch.qos.logback:logback-classic:jar:1.0.10:compile
[INFO] | - ch.qos.logback:logback-core:jar:1.0.10:compile
[INFO] ± org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] ± org.slf4j:jul-to-slf4j:jar:1.7.5:compile

Aha! This helps: http://docs.spring.io/spring-boot/docs/1.1.10.RELEASE/reference/html/boot-features-logging.html

Sorry, this is the first spring boot application I’ve used.

1 Like