class Fluent::Compat::Filter

Private Class Methods

new() click to toggle source
Calls superclass method Fluent::Plugin::Filter.new
# File lib/fluent/compat/filter.rb, line 30
def initialize
  super
  unless self.class.ancestors.include?(Fluent::Compat::CallSuperMixin)
    self.class.prepend Fluent::Compat::CallSuperMixin
  end
end

Private Instance Methods

before_shutdown() click to toggle source
Calls superclass method Fluent::Plugin::Base#before_shutdown
# File lib/fluent/compat/filter.rb, line 59
def before_shutdown
  super
end
configure(conf) click to toggle source
Calls superclass method Fluent::PluginLoggerMixin#configure
# File lib/fluent/compat/filter.rb, line 37
def configure(conf)
  ParserUtils.convert_parser_conf(conf)
  FormatterUtils.convert_formatter_conf(conf)

  super
end
shutdown() click to toggle source
Calls superclass method Fluent::Plugin::Base#shutdown
# File lib/fluent/compat/filter.rb, line 63
def shutdown
  super
end
start() click to toggle source

These definitions are to get instance methods of superclass of 3rd party plugins to make it sure to call super

Calls superclass method Fluent::PluginLoggerMixin#start
# File lib/fluent/compat/filter.rb, line 46
def start
  super

  if instance_variable_defined?(:@formatter) && @inject_config
    unless @formatter.class.ancestors.include?(Fluent::Compat::HandleTagAndTimeMixin)
      if @formatter.respond_to?(:owner) && !@formatter.owner
        @formatter.owner = self
        @formatter.singleton_class.prepend FormatterUtils::InjectMixin
      end
    end
  end
end