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 187
def configure(conf)
  super

  if s = conf['include_tag_key']
    b = Config.bool_value(s)
    if s.empty?
      b = true
    elsif b == nil
      raise ConfigError, "Invalid boolean expression '#{s}' for include_tag_key parameter"
    end
    @include_tag_key = b
  end

  if @include_tag_key
    if tag_key = conf['tag_key']
      @tag_key = tag_key
    end
    unless @tag_key
      @tag_key = 'tag'
    end

  else
    @include_tag_key = false
  end
end
filter_record(tag, time, record) click to toggle source
# File lib/fluent/mixin.rb, line 213
def filter_record(tag, time, record)
  super
  if @include_tag_key
    record[@tag_key] = tag
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.