-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Revise logging in the TestContext framework #29229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The main reason for the lengthy DEBUG logging is that Spring Boot's So we can reduce the DEBUG logging significantly by logging the class names of We can do the same when logging And we can further reduce the logging by only logging trace-like information in |
Comparison of Log OutputThe following log output was generated for a Spring Boot test class annotated with Spring Boot 2.7.5 / Spring Framework 5.3.24
Spring Boot 3.0.0-SNAPSHOT / Spring Framework 6.0.0-RC2
Spring Boot 3.0.0-SNAPSHOT / Spring Framework 6.0.0-SNAPSHOT (RC3)With the changes in 997dd3e, we now see the following tremendously reduced log output at DEBUG level.
|
Overview
For a Spring Boot test, Logback logs at
DEBUG
level by default until Spring Boot's logging infrastructure has a chance to take control.For a Spring Boot test running with Framework 6.0 milestones, this can result in a considerable amount of INFO and DEBUG output.
For example:
It's not the number of lines (as seen above) that causes an issue. Rather, it's the amount of information in each line that can become overwhelming, especially when the
MergedContextConfiguration
is based on many configuration classes.The following "console" like layout makes the issue apparent.
Deliverables
The text was updated successfully, but these errors were encountered: