Spring boot 日志配置: logback-spring.xml配置文件









    
    
    
    logback

    
    
    
    
    
    
    

    
    
        
        
            debug
        
        
            ${CONSOLE_LOG_PATTERN}
            
            UTF-8
        
    

    
    
    
        
        ${log.path}/web_debug.log
        
        
            %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
            UTF-8 
        
        
        
            
            ${log.path}/web-debug-%d{yyyy-MM-dd}.%i.log
            
                100MB
            
            
            15
        
        
        
            debug
            ACCEPT
            DENY
        
    

    
    
        
        ${log.path}/web_info.log
        
        
            %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
            UTF-8
        
        
        
            
            ${log.path}/web-info-%d{yyyy-MM-dd}.%i.log
            
                100MB
            
            
            15
        
        
        
            info
            ACCEPT
            DENY
        
    

    
    
        
        ${log.path}/web_warn.log
        
        
            %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
            UTF-8 
        
        
        
            ${log.path}/web-warn-%d{yyyy-MM-dd}.%i.log
            
                100MB
            
            
            15
        
        
        
            warn
            ACCEPT
            DENY
        
    

    
    
        
        ${log.path}/web_error.log
        
        
            %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
            UTF-8 
        
        
        
            ${log.path}/web-error-%d{yyyy-MM-dd}.%i.log
            
                100MB
            
            
            15
        
        
        
            ERROR
            ACCEPT
            DENY
        
    

    

    

    

    
    
        
            
            
            
            
            
        
    

    
        
            
            
            
            
            
        
    

    
        
            
            
            
            
            
        
    


参考: https://blog.csdn.net/qq_41413094/article/details/92965645

你可能感兴趣的:(Spring boot 日志配置: logback-spring.xml配置文件)