The spring boot log is output by default with Logback, and you can customize the Logback by using the following method:
Create a Logback.xml configuration file under the Resources folder
<?XML version= "1.0" encoding= "UTF-8"?><Configuration> <!--Base.xml in the Spring-boot jar, - <includeResource= "Org/springframework/boot/logging/logback/base.xml"/> <!--<logger name= "Org.springframework.web" level= "DEBUG"/> - <!--output Hibernate sql, will be recorded in the file log, so use: Spring.jpa.show-sql configuration is better - <!--<logger name= "Org.hibernate.SQL" level= "DEBUG"/> - <Loggername= "Org.springframework.jdbc.core.JdbcTemplate" Level= "DEBUG"/> <Loggername= "Org.apache.tomcat.jdbc.pool" Level= "DEBUG"/></Configuration>
Specific configuration, you can locate the Spring-boot.jar inside to see
Log file path configuration can be configured in Application.properties
Logging.file=/tmp/logs/springboottest.log
Iv. Spring Boot Log Management