Sha256: e5cd4e8ff762a71e9ee697be10e1b1ce797316d0ab0cecaa72a045e80512cca8
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
require 'fluent/filter' require 'fluent/parser' module Fluent class TypecastFilter < Filter Fluent::Plugin.register_filter('typecast', self) include ::Fluent::TextParser::TypeConverter def filter(tag, time, record) filtered = record.map do |key, val| [key, convert_type(key, val)] end Hash[*filtered.flatten(1)] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-filter_typecast-0.0.3 | lib/fluent/plugin/filter_typecast.rb |