logback.xml

logback的启动顺序

14:45:31,360 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
14:45:31,361 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
14:45:31,361 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/maintain/target/classes/logback.xml]

 logback配置信息




    
    
    
    
    
        
            ${SSCM_LOG_PATTERN}
        
        ${LOG_FILE}
        
            ${LOG_FILE}.%i
            1
            30
        
        
            50MB
        
    
    
        
        
    

 打印日志结果:

2019-07-18 11:40:13.345 DEBUG [maintain,1c7a32cd740c2e00,1c7a32cd740c2e00,true] 18461 --- [http-nio-18071-exec-5] c.l.c.pscm.facility.proxy.MaterialProxy [72] : [MaterialProxy#queryLegalPlantByCodesAndEnabledIsTrue] x-xss-protection: 1; mode=block
2019-07-18 11:40:13.345 DEBUG [maintain,1c7a32cd740c2e00,1c7a32cd740c2e00,true] 18461 --- [http-nio-18071-exec-5] c.l.c.pscm.facility.proxy.MaterialProxy [72] : [MaterialProxy#queryLegalPlantByCodesAndEnabledIsTrue]

打印格式解析:

 
%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} [%X{traceId}] ${PID:- } [%thread] [%-40.40logger{39}:%line] %m%n 

 

你可能感兴趣的:(发布)