Skip to content

Commit

Permalink
Support log_level of Fluentd 0.10.43
Browse files Browse the repository at this point in the history
  • Loading branch information
sonots committed Feb 4, 2014
1 parent e0501a7 commit a701cd0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fluent/plugin/out_flowcounter_simple.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class Fluent::FlowCounterSimpleOutput < Fluent::Output
Fluent::Plugin.register_output('flowcounter_simple', self)

# To support log_level option implemented by Fluentd v0.10.43
unless method_defined?(:log)
define_method("log") { $log }
end

config_param :indicator, :string, :default => 'num'
config_param :unit, :string, :default => 'second'
config_param :comment, :string, :default => nil
Expand Down Expand Up @@ -67,7 +72,7 @@ def countup(count)
def flush_emit(step)
count, @count = @count, 0
if count > 0
$log.info @output_proc.call(count)
log.info @output_proc.call(count)
end
end

Expand Down

0 comments on commit a701cd0

Please sign in to comment.