Class: Fluent::AnonymizerOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::AnonymizerOutput
- Includes:
- HandleTagNameMixin, Mixin::RewriteTagName, SetTagKeyMixin
- Defined in:
- lib/fluent/plugin/out_anonymizer.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ AnonymizerOutput
constructor
A new instance of AnonymizerOutput.
Constructor Details
#initialize ⇒ AnonymizerOutput
Returns a new instance of AnonymizerOutput.
21 22 23 24 |
# File 'lib/fluent/plugin/out_anonymizer.rb', line 21 def initialize require 'fluent/plugin/anonymizer' super end |
Instance Method Details
#configure(conf) ⇒ Object
26 27 28 29 |
# File 'lib/fluent/plugin/out_anonymizer.rb', line 26 def configure(conf) super @anonymizer = Fluent::Anonymizer.new(self, conf) end |
#emit(tag, es, chain) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/fluent/plugin/out_anonymizer.rb', line 31 def emit(tag, es, chain) es.each do |time, record| record = @anonymizer.anonymize(record) emit_tag = tag.dup filter_record(emit_tag, time, record) Fluent::Engine.emit(emit_tag, time, record) end chain.next end |