logback.xml不同日志打印到不同文件中,自定义类日志输出到自定义的日志文件中



    
    
    
    
    
    
    
    
    
    
    
    
    
        
            ${COLOUR_LOG_PATTERN}-->
            utf8
        
    
    
    
    
        
        
            
            ${LOG_HOME}/${LOG_NAME_BEGIN}-all-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            
            ${COLOUR_LOG_PATTERN}
        
    


    
    
        
            ${LOG_HOME}/${LOG_NAME_BEGIN}-info-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            ${COLOUR_LOG_PATTERN}
        
        
            INFO
            ACCEPT
            DENY
        
    
    
    
        
            ${LOG_HOME}/${LOG_NAME_BEGIN}-debug-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            ${COLOUR_LOG_PATTERN}
        
        
            DEBUG
            ACCEPT
            DENY
        
    

    
    
        
            ${LOG_HOME}/${LOG_NAME_BEGIN}-error-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            ${COLOUR_LOG_PATTERN}
        
        
            ERROR
            ACCEPT
            DENY
        
    

    
    
        
            ${LOG_HOME}/${LOG_NAME_BEGIN}-warn-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            ${COLOUR_LOG_PATTERN}
        
        
            WARN
            ACCEPT
            DENY
        
    




    
        
        
            
            ${LOG_HOME}/${LOG_NAME_BEGIN}-class1-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            
            ${COLOUR_LOG_PATTERN}
        
    


    
        
        
            
            ${LOG_HOME}/${LOG_NAME_BEGIN}-class2-%d{yyyy-MM-dd}_%i.log
            
            ${maxFileSize}
            
            ${totalSizeCap}
            
            ${MaxHistory}
        
        
            
            ${COLOUR_LOG_PATTERN}
        
    

     
    
        
    
     
    
        
    



     
    
        
        
        
        
        
        
    


你可能感兴趣的:(logback,xml,java)