Class: Chef::Handler::Fluentd

Inherits:
Chef::Handler show all
Defined in:
lib/chef/handler/fluentd.rb,
lib/chef/handler/fluentd/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Instance Method Summary collapse

Constructor Details

#initialize(tag_prefix, opts) ⇒ Fluentd

Returns a new instance of Fluentd.



9
10
11
12
# File 'lib/chef/handler/fluentd.rb', line 9

def initialize(tag_prefix, opts)
  @opts = opts
  @tag_prefix = tag_prefix
end

Instance Method Details

#reportObject



14
15
16
17
# File 'lib/chef/handler/fluentd.rb', line 14

def report
  tag = success? ? 'report' : 'exception'
  logger.post(tag, data)
end