logback 配置不同级别日志输出

logback节点配置详解请参考:http://www.cnblogs.com/DeepLearing/p/5663178.html

 配置不同级别日志输出模板如下:





	
	
	
	
	

	
	
		
			${log.pattern}
		
	

	
	
		
		${log.filePath}/debug.log
		
			
			${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz
			
			
			${log.maxHistory}
		
		
            ${log.pattern}
        
        
            DEBUG
            ACCEPT  
            DENY  
        
	
	
	
	
		
		${log.filePath}/info.log
		
			
			${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz
			
			
			${log.maxHistory}
		
		
            ${log.pattern}
        
        
            INFO
            ACCEPT  
            DENY  
        
	
	
	
	
		
		${log.filePath}/error.log
		
			
			${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz
			
			
			${log.maxHistory}
		
		
            ${log.pattern}
        
        
            ERROR
            ACCEPT  
            DENY  
        
	
	
    
    
		
		
		
    

	
		
	




你可能感兴趣的:(logback)