Closed
Description
Spring boot version: 2.0.2.RELEASE
Last worked in version: 1.5.13.RELEASE
Tomcat version: 9.0.0.0 (also reproducible on older version of Tomcat)
Java version: 1.8.0_121-b13
Messages logged using Logger.getLogger().log() are logged twice into console when application is deployed to Tomcat with default Spring boot configuration (application.properties and logback.xml are missing).
When application is started standalone from console, the issue does not occur and each call of Logger.getLogger().log() causes only one message in console.
I attach a sample project in which the issue can be easily reproduced:
logging-bug.zip
To reproduce the issue, follow these steps:
- Build the project using
mvn package
. - Deploy created war file to Tomcat in default configuration.
- Access URL: http://localhost:8080/logging-bug/rest/status
-> Two log messages are printed in console instead of only one message. See screenshot: