Reputation: 110163
I only want to log errors in my spring boot application. This is what I have in my application.properties
file:
logging.level.com.test.login=ERROR
However, that seems to only catch errors in my application. Is there a way to set it globally for everything, so I only see errors printed to my console, and nothing else? Now it prints tons of INFO statement:
Upvotes: 4
Views: 11475
Reputation: 5937
From: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-logging.html
logging.level.root=ERROR
logging.level.org.foo.bar.baz=INFO
If you are using YAML, you can use the same basic layout for root, but for package-level, just write out the entire package in a single line rather than using tree format.
logging:
level:
root: ERROR
org.foo.bar.baz: INFO
Upvotes: 6
Reputation: 492
You can also use this property
logging.level.root=INFO,ERROR,DEBUG
Upvotes: 0