Class: Fluent::BetterTimestampOutput

Inherits:
Output
  • Object
show all
Includes:
Mixin::ConfigPlaceholders, SetTagKeyMixin
Defined in:
lib/fluent/plugin/out_better_timestamp.rb

Constant Summary collapse

BUILTIN_CONFIGURATIONS =
%W(type tag timestamp_key msec_key)

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fluent/plugin/out_better_timestamp.rb', line 17

def configure(conf)
  super

  @map = {}
  conf.each_pair { |k, v|
    unless BUILTIN_CONFIGURATIONS.include?(k)
      conf.has_key?(k)
      @map[k] = v
    end
  }

end

#emit(tag, es, chain) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/fluent/plugin/out_better_timestamp.rb', line 30

def emit(tag, es, chain)
  es.each { |time, record|
    filter_record(tag, time, record)
    Engine.emit(@tag, time, modify_record(time, record))
  }

  chain.next
end