summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-07-09 23:36:41 +0300
committerGitHub <noreply@github.com>2016-07-09 23:36:41 +0300
commita058d6ab423944e106c4c2941e026e4519fed2fa (patch)
tree02c29da2aef802ed8b624a876f295977cc9f7cba
parent9e3f61aef032dfa1ee1233ceada437c00bdc697a (diff)
parent3bd6151592f5b65308ff8b73e5bf939476a7ac89 (diff)
Merge pull request #492 from nickhilliard/bf-remove-annoying-puts
puts should not be used for debugging - use Oxidized.logger.debug instead
-rw-r--r--lib/oxidized/node.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index cc1e406..9f729ed 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -9,9 +9,7 @@ module Oxidized
attr_accessor :running, :user, :msg, :from, :stats, :retry
alias :running? :running
def initialize opt
- if Oxidized.config.debug == true or opt[:debug] == true
- puts 'resolving DNS for %s...' % opt[:name]
- end
+ Oxidized.logger.debug 'resolving DNS for %s...' % opt[:name]
@name = opt[:name]
@ip = IPAddr.new(opt[:ip]).to_s rescue nil
@ip ||= Resolv.new.getaddress @name