Yes. By default, messages with priorities ERROR, WARN, INFO will be displayed in the application. To enable the output of DEBUG or TRACE levels, you must use the --debug
/ --trace
or set the property properties debug / trace = true.
logging.level.root = WARN logging.level.org.springframework.web = DEBUG logging.level.org.hibernate = ERROR
By default, Sprin Boot only logs to the console. If you want to log events to a file, you must set the logging.file or logging.path properties to true (for example, in application.properties).
Color logging
In consoles supporting ANSI, to improve readability, messages of different levels can be highlighted with different colors. This is how it is configured in the property file:
logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss}) {yellow}
If you want to write went to other files, you can also configure this (YAML):
logging: path: /var/logs/ file: bookWarn.log level: root: WARN org. springframework: security: DEBUG