logback日志归档打包

效果图

image.png

配置文件>>>log-back-spring.xml








    

    logback
    
    

    
    
    
    
    
    
    


    
    
        
        
            info
        
        
            ${CONSOLE_LOG_PATTERN}
            
            UTF-8
        
    


    

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

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

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


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

    
    
        
            
        
    

    
        
            
            
            
        
    

    
        
            
            
            
        
    

    
        
        
        
        
        
    


你可能感兴趣的:(logback日志归档打包)