Included Modules

Class/Module Index [+]

Quicksearch

Fluent::SetTagKeyMixin

Attributes

include_tag_key[RW]
tag_key[RW]

Public Instance Methods

configure(conf) click to toggle source
# 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
# File lib/fluent/mixin.rb, line 187
def filter_record(tag, time, record)
  super

  record[@tag_key] = tag if @include_tag_key
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.