module Fluent::SetTagKeyMixin
Attributes
include_tag_key[RW]
tag_key[RW]
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/mixin.rb, line 172 def configure(conf) @include_tag_key = false super if s = conf['include_tag_key'] include_tag_key = Config.bool_value(s) raise 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::RecordFilterMixin#filter_record
# File lib/fluent/mixin.rb, line 187 def filter_record(tag, time, record) super record[@tag_key] = tag if @include_tag_key end