springboot配置logback日志(精简版)

1.application.properities配置

#日志配置信息
logging.config=classpath:logback-spring.xml
log.path=/logs
log.level=info
log.name=allen-project

2.logback-spring.xml配置










     
         %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
     




     ${logPath}/${logName}.log
     
         %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
     
        
     
            
            ${logPath}/${logName}.%d.log.zip
            
            30
     
     
     
         200MB
       




   
   



你可能感兴趣的:(springboot配置logback日志(精简版))