class Fluent::Plugin::MultiOutput

def call_lifecycle_method(method_name, checker_name)

TODO: this hack will be removed at v2.
sub-plugins. So child plugins' lifecycles MUST be controlled by MultiOutput plugin itself.
But when MultiOutput plugins are created dynamically (by forest plugin or others), agent cannot find
def call_lifecycle_method(method_name, checker_name)
  return if @outputs_statically_created
  @outputs.each do |o|
    begin
      log.debug "calling #{method_name} on output plugin dynamically created", type: Fluent::Plugin.lookup_type_from_class(o.class), plugin_id: o.plugin_id
      o.send(method_name) unless o.send(checker_name)
    rescue Exception => e
      log.warn "unexpected error while calling #{method_name} on output plugin dynamically created", plugin: o.class, plugin_id: o.plugin_id, error: e
      log.warn_backtrace
    end
  end
end