lib/fluent/plugin/out_elapsed_time.rb in fluent-plugin-elapsed-time-0.0.4 vs lib/fluent/plugin/out_elapsed_time.rb in fluent-plugin-elapsed-time-0.0.5
- old
+ new
@@ -1,9 +1,14 @@
module Fluent
class ElapsedTimeOutput < MultiOutput
Plugin.register_output('elapsed_time', self)
+ # To support log_level option implemented by Fluentd v0.10.43
+ unless method_defined?(:log)
+ define_method("log") { $log }
+ end
+
config_param :tag, :string, :default => 'elapsed'
config_param :add_tag_prefix, :string, :default => nil
config_param :remove_tag_prefix, :string, :default => nil
config_param :remove_tag_slice, :string, :default => nil
config_param :aggregate, :string, :default => 'all'
@@ -40,10 +45,10 @@
}.each {|e|
type = e['type']
unless type
raise ConfigError, "Missing 'type' parameter on <store> directive"
end
- $log.debug "adding store type=#{type.dump}"
+ log.debug "adding store type=#{type.dump}"
output = Plugin.new_output(type)
output.configure(e)
@outputs << output
}