SSM框架整合日志

log4j

https://www.jianshu.com/p/f256866a2ebe

log4j2

pom.xml文件


2.9.0

 
            org.apache.logging.log4j
            log4j-core
            ${log4j.version}
            
                
                    org.apache.logging.log4j
                    log4j-api
                
            
        
        
            org.apache.logging.log4j
            log4j-slf4j-impl
            ${log4j.version}
            
                
                    org.apache.logging.log4j
                    log4j-api
                
            
        
        
            org.apache.logging.log4j
            log4j-api
            ${log4j.version}
        

resources下log4j2.xml







    
        %d{yyyy-MM-dd HH:mm:ss z} %-5level %class{36} %L %M - %msg%xEx%n
        /Users/data/www/logs/appLogs
        cjzc
    
    
    
        
        
            
            
                              
                              
                              
                              
                              
                
            
            
        
        
        
        

        
            
            
            
            
                
            
            
                
                
            
            
        

        
            
            
            
            
                
            
            
                
                
            
            
        

        
            
            
            
            
                
                
            
            
        

        
            
                
            
            
            
                
                
            
            
        

        
            
                
                
            
            
            
                
            
            
                
                
            
            
        
        
            
                
            
            
            
            
                
                
            
            
        
    
    
    
        
        
        
        

        
            
        

        
            
            
        

        
            
            
            
        
    

你可能感兴趣的:(日志)