summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiyev@gmail.com>2016-06-02 23:53:29 +0200
committerElvin Efendi <elvin.efendiyev@gmail.com>2016-06-02 23:53:29 +0200
commitaef81bd14989797d26d349fdf1a517045f5af33c (patch)
treedb194c27c1fa4c8542a048e4afd8dcb0793acb27 /lib/oxidized/node.rb
parent779f20dd18a361b5bde51f3f11c6d048efe100a0 (diff)
parent64bdbeb673a8ab7155478ee5e0d1d58c1631a9d3 (diff)
Merge pull request #25 from Shopify/debug-statements
Debug statements
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index 35bcad9..cc1e406 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -38,9 +38,11 @@ module Oxidized
next unless @model.cfg[cfg_name] and not @model.cfg[cfg_name].empty?
@model.input = input = input.new
if config=run_input(input)
+ Oxidized.logger.debug "lib/oxidized/node.rb: #{input.class.name} ran for #{name} successfully"
status = :success
break
else
+ Oxidized.logger.debug "lib/oxidized/node.rb: #{input.class.name} failed for #{name}"
status = :no_connection
end
end
@@ -165,6 +167,7 @@ module Oxidized
def resolve_model opt
model = (opt[:model] or Oxidized.config.model)
if not Oxidized.mgr.model[model]
+ Oxidized.logger.debug "lib/oxidized/node.rb: Loading model #{model.inspect}"
Oxidized.mgr.add_model model or raise ModelNotFound, "#{model} not found for node #{ip}"
end
Oxidized.mgr.model[model].new