module Fluent::Compat::SetTagKeyMixin
Attributes
include_tag_key[RW]
tag_key[RW]
Private Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/compat/set_tag_key_mixin.rb, line 28 def configure(conf) @include_tag_key = false super if s = conf['include_tag_key'] include_tag_key = Fluent::Config.bool_value(s) raise Fluent::ConfigError, "Invalid boolean expression '#{s}' for include_tag_key parameter" if include_tag_key.nil? @include_tag_key = include_tag_key end @tag_key = conf['tag_key'] || 'tag' if @include_tag_key end
filter_record(tag, time, record)
click to toggle source
Calls superclass method
Fluent::Compat::RecordFilterMixin#filter_record
# File lib/fluent/compat/set_tag_key_mixin.rb, line 43 def filter_record(tag, time, record) super record[@tag_key] = tag if @include_tag_key end