๐๐ SPRING CERTIFICATION QUESTION: How can you control logging with Spring Boot?
๐๐ SPRING CERTIFICATION QUESTION: How can you control logging with Spring Boot?
Answer:
Even though Spring Boot is an 'opinionated' framework, its true power comes with the possibility to customize each and every pre-configured layer.
When it comes to logging the following can be changed:
* log level of the core Spring loggers (container, Hibernate, Spring Boot):
--> specify --๐ ๐๐๐๐ or --๐๐๐๐๐ flag.
--> specify application property ๐ ๐๐๐๐=๐๐๐๐, ๐๐๐๐๐=๐๐๐๐.
* message color of console output.
* file output using ๐๐๐๐๐๐๐.๐๐๐๐ or ๐๐๐๐๐๐๐.๐๐๐๐ application property.
* logging level of specific classes or logging groups.
* specify different logging implementations by including libraries on the classpath (logback is used by default).
#spring #certificationquestion #vcp
Logging in Spring Boot ๐ https://www.baeldung.com/spring-boot-logging