Sometimes it is nice to be able to see all debugging information from your spring boot application. I am not going to go over the various Java logging frameworks but rather the quick and easy way to set a logging level.
Logging Level Types
By default, ERROR, WARN and INFO level messages are logged. You can show more specific logs by explicitly setting the type. There are five main logging levels (NOTE: FATAL
is mapped to ERROR
so I am only counting five):
ERROR
WARN
INFO
DEBUG
TRACE
Set Root Logging Level
When debugging it might be helpful to just set the root logging level to debug. Here are a couple of examples
Set logging level in application.properties
logging.level.root=DEBUG
Set logging level in application.yml
logging.level.root: DEBUG
As always, please comment with questions, suggestions, best practices, etc…
Leave a Reply