SpringBoot集成GrayLog日志收集

项目集成GrayLog配置

添加依赖

  
            biz.paluch.logging
            logstash-gelf
            1.4.0
        

在logback-spring.xml 配置文件中添加grayLog的配置

主要是host和port,分别指的是GrayLog收集服务的ip和input的端口(这里配置的端口要与在system-inputs配置的端口一致)


        udp:127.0.0.1
        12201
        user-center
        true
        true
        true
        yyyy-MM-dd HH:mm:ss,SSS
        8192
        

你可能感兴趣的:(SpringBoot集成GrayLog日志收集)