Sha256: f9e4a4e698631f70289314cab62ef0ee25fdc205347b680771d7dcef60cd1362

Contents?: true

Size: 1.74 KB

Versions: 2

Compression:

Stored size: 1.74 KB

Contents

require 'fluent/mixin/plaintextformatter'

module Fluent
  class TestAOutput < Fluent::BufferedOutput
    Fluent::Plugin.register_output('testa', self)

    config_set_default :buffer_type, 'memory'

    include Fluent::Mixin::PlainTextFormatter

    config_set_default :output_include_time, true
    config_set_default :output_include_tag, true
    config_set_default :output_data_type, 'json'
    config_set_default :field_separator, "\t"
    config_set_default :add_newline, true
    config_set_default :remove_prefix, nil
    config_set_default :default_tag, 'tag.blank'

    def configure(conf)
      super
    end
  end

  class TestBOutput < Fluent::BufferedOutput
    Fluent::Plugin.register_output('testa', self)

    config_set_default :buffer_type, 'memory'

    include Fluent::Mixin::PlainTextFormatter

    config_set_default :output_include_time, true
    config_set_default :output_include_tag, true
    config_set_default :output_data_type, 'json'
    config_set_default :field_separator, "COMMA"
    config_set_default :add_newline, false
    config_set_default :remove_prefix, nil
    config_set_default :default_tag, 'tag.blank'

    def configure(conf)
      super
    end
  end

  class TestCOutput < Fluent::BufferedOutput
    Fluent::Plugin.register_output('testc', self)

    config_set_default :buffer_type, 'memory'

    include Fluent::Mixin::PlainTextFormatter

    config_set_default :output_include_time, false
    config_set_default :output_include_tag, false
    config_set_default :output_data_type, 'json'
    config_set_default :field_separator, "\t"
    config_set_default :add_newline, true
    config_set_default :remove_prefix, nil
    config_set_default :default_tag, 'tag.blank'

    def configure(conf)
      super
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-mixin-plaintextformatter-0.2.0 test/output.rb
fluent-mixin-plaintextformatter-0.1.0 test/output.rb