When building a project using https://start.spring.io the template provided by [Spring Start], the dependencies required for logging are already built into it. To use logs, all you need is a simple configuration.

Open the project’s applications.yaml file and add the appropriate configuration options to it. as:

1
2
3
4
5
6
7
8
9
logging:
level:
root: WARN
org:
springframework:
web: DEBUG
info:
mlstech:
api: DEBUG

In the above settings, the overall log base is set to WARN, and the log level of different packages is set according to the needs of development and debugging.

TAGS