log4r icon indicating copy to clipboard operation
log4r copied to clipboard

adding outputter for logstash udp input

Open marcelog opened this issue 11 years ago • 0 comments

Hey guys,

This pull adds a new outputter to use the logstash udp input. The code is based on the UDPOutputter. Here's a sample yml config for it:

    - type: LogstashUDPOutputter
      name: logstashUDP
      level: WARN
      date_pattern: '%Y%m%d'
      trunc: 'false'
      hostname: '127.0.0.1'
      port: 10001
      log_type: 'this_will_show_up_in_logstash'
      formatter:
        date_pattern: '%y%m%d %H:%M:%S'
        pattern: '%m'
        type: PatternFormatter

And a sample config for logstash:

   udp {
    codec => json
    port => 10001
    queue_size => 2
    workers => 2
    type => myAppType
  }

Does this sound like a desirable feature for the project? Will appreciate any comments on the implementation.

Thanks in advance! Cheers,

marcelog avatar Sep 19 '14 22:09 marcelog