Spring-boot will ignore your own log4j.properties

Spring-boot will ignore your own log4j.properties

2018/02/18 Programming 0

Spring-boot will ignore your own log4j.properties, two ways to fix that

Way 1:

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<version>1.5.10.RELEASE</version>
			<exclusions>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-classic</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>log4j-over-slf4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

Way 2:
Put the spring-boot dependency in higher positions in , but way 1 seems much better way to fix this problem.

Peter.

Leave a Reply

Your email address will not be published.