Skip to content
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

Reduce verbosity of test logging #789

Open
thadguidry opened this issue Nov 12, 2024 · 3 comments
Open

Reduce verbosity of test logging #789

thadguidry opened this issue Nov 12, 2024 · 3 comments
Assignees
Labels
CI/CD Continuous Integration/Continuous Deployment/DevOps enhancement New feature or request good first issue Good for newcomers Spring framework config, debugging, etc. tests anything to do with Tests (resources, data, config, etc.)

Comments

@thadguidry
Copy link
Collaborator

If someone is more familiar with Spring, then I'd welcome some help on this issue!

It would be nice to be able to reduce the verbosity of logs during tests.
This would be useful to incorporate during our CI workflows for GitHub as well as locally.

I've investigated various methods suggested on Stackoverflow as well as https://www.baeldung.com/spring-boot-testing-log-level , but still having difficulty getting something that could work at the mvn command line easily such as:

mvn verify "-Dspring.config.location=file:./config/testing.properties"

and where that testing.properties file contents would be something like:

spring.main.banner-mode=off
logging.level.org.springframework=INFO
logging.level.root=OFF
@thadguidry thadguidry added enhancement New feature or request good first issue Good for newcomers tests anything to do with Tests (resources, data, config, etc.) CI/CD Continuous Integration/Continuous Deployment/DevOps Spring framework config, debugging, etc. labels Nov 12, 2024
@kdhrubo
Copy link
Collaborator

kdhrubo commented Nov 22, 2024

Example this class
https://github.com/9tigerio/db2rest/blob/master/api-rest/src/test/java/com/homihq/db2rest/rest/pg/PgBasicJoinControllerTest.java

line #47 .andDo(print()) is the problem. Just comment out that line from all files, and it will disappear. No special configuration is required.

@lserveriiev lserveriiev self-assigned this Nov 27, 2024
@lserveriiev
Copy link
Collaborator

Hi @kdhrubo. I will pick it up.

@kdhrubo
Copy link
Collaborator

kdhrubo commented Nov 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration/Continuous Deployment/DevOps enhancement New feature or request good first issue Good for newcomers Spring framework config, debugging, etc. tests anything to do with Tests (resources, data, config, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants