springboot输出log到graylog2

maven

        
            org.graylog2.log4j2
            log4j2-gelf
            1.3.0
        
        
            org.springframework.boot
            spring-boot-starter
            
                
                    spring-boot-starter-logging
                    org.springframework.boot
                
            
        
        
            org.springframework.boot
            spring-boot-starter-log4j2
        

log4j2.xml



    
        
            
        
        
            
            
        
    
    
        
            
            
        
    

graylog2配置input

springboot输出log到graylog2_第1张图片

查看log

springboot输出log到graylog2_第2张图片

你可能感兴趣的:(graylog,springboot)