From 3bd6151592f5b65308ff8b73e5bf939476a7ac89 Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Sat, 9 Jul 2016 21:07:34 +0100 Subject: puts should not be used for debugging - use Oxidized.logger.debug instead. --- lib/oxidized/node.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/oxidized') 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 -- cgit v1.2.1