Springboot项目下的logback.xml

直接上模板,其中有注释,在现有的项目里拷出来的.


    
    
    
    
        
            %d %p (%file:%line\)- %m%n
            UTF-8
        
    
    
    
    

	
    
        
        ${LOG_HOME}/mysql.log
        
        
            
                %d %p (%file:%line\)- %m%n
            
            UTF-8
        
        
        
            ${LOG_HOME}/mysql.log.%d.%i
            
                
                64 MB
            
        
    

	
    
        
        ${LOG_HOME}/mysql.log
        
        
            
                %d %p (%file:%line\)- %m%n
            
            UTF-8
        
        
        
            ${LOG_HOME}/mysql.log.%d.%i
            
                
                64 MB
            
        
    

	
    
        
    

	
    
        
        
    
    
    

在项目中使用时:

Logger logger = LoggerFactory.getLogger(所在类名.class);

你可能感兴趣的:(技巧)