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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With