Upgrading to 2.0.0.RELEASE from 1.5.10.RELEASE breaks logging behavior
See original GitHub issueOriginally, my app is working with 1.5.10.RELEASE alongside Groovy, and I make my logging using Groovy’s @Log4j
annotation and everything works fine; the logging is made using the configurations set in the application.properties
, file is correctly updated and no undesired messages are shown. This is the configuration I’m originally using:
# Logging
logging.file=application.log
logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} [%X{correlationId}] %m%n%wEx
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } --- [%t] %-40.40logger{39} : [%X{correlationId}] %m%n%wEx
When I try to upgrade to the 2.0.0.RELEASE, the logging is broken, in the sense that neither the messages I want to log are shown, nor the log file is updated correctly. Besides, my console gets saturated with log messages from external libraries I’m using, as if it was in some sort of Debug mode.
Any idea what’s going on? Might groovy annotations have conflicts with spring boot auto-configuration?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SLF4J FAQ
For most users, upgrading to version 2.0..x should be a drop-in replacement, as long as the logging provider is updated as well. In...
Read more >VMware Tanzu Application Service for VMs v2.9 Release Notes
[Breaking Change] This restores the breaking change originally found in 2.9.18 and temporarily remediated in 2.9.19: Gorouter update to Golang v1.15 introduces ...
Read more >Room kapt error when upgrading kotlin or gradle
I think, This happens when we update "kotlin-gradle-plugin" and the other dependencies are not the latest version.
Read more >Change Log : revIgniter User Guide
Fixed: Upgrade info for version 2.0.0 in chapter "Upgrading from 1.10.3 to 2.0.0" of the User Guide. Version 2.0.1. Release Date: ...
Read more >Spring Boot Reference Documentation
If you are upgrading from the 1.x release of Spring Boot, check the ... We can also update the state of the application,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
While making the sample project, the behavior was exactly as you mentioned, by getting a compilation error when using the
@log4j
. The erratic behavior was due to and old library using log4j. By changing the annotation to@Slf4j
everything worked again.Thanks a lot your help!
@log4j
is indeed backed by log4j1.x and requires log4j1.x on the classpath to work, see https://github.com/apache/groovy/blob/master/src/main/groovy/groovy/util/logging/Log4j.java