InterviewSolution
| 1. |
Can You Control Logging With Spring Boot? How? |
|
Answer» Yes, we can CONTROL LOGGING with spring boot. Customizing default CONFIGURATION for Logging: By ADDING logback.xml file to the application we can override the default logging configuration providing by the Spring Boot. This file place in the classpath (src/main/resources) of the application for Spring Boot to pick the custom configuration. Spring Boot can control the logging level Just set it in application.properties Works with most logging frameworks Java Util Logging, Logback, Log4J, Log4J2 logging.level.org.springframework=DEBUG logging.level.com.acme.your.code=INFO Yes, we can control logging with spring boot. Customizing default Configuration for Logging: By adding logback.xml file to the application we can override the default logging configuration providing by the Spring Boot. This file place in the classpath (src/main/resources) of the application for Spring Boot to pick the custom configuration. Spring Boot can control the logging level Just set it in application.properties Works with most logging frameworks Java Util Logging, Logback, Log4J, Log4J2 logging.level.org.springframework=DEBUG logging.level.com.acme.your.code=INFO |
|