Sha256: 49ad5cbab795e7d722d71ec10a41a91a3ecc5c36abb129a6db4d3fae629a9cfd

Contents?: true

Size: 252 Bytes

Versions: 1

Compression:

Stored size: 252 Bytes

Contents

module Fluent
  class Simple2hash < Filter
    def filter(tag, time, record)
      if record.is_a?(Numeric) or record.is_a?(Array) or record.is_a?(String)
        return {"value" => record}
      else
        return record
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-plugin-simple-to-hash-0.0.1 lib/fluent/plugin/filter_simple2hash.rb