CAN YOU CONTROL LOGGING WITH SPRING BOOT? HOW?

Can you control logging with Spring Boot? How?

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 by providing the Spring Boot. This file isplaced 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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>