From 1c4f886e883f947b649613a21955929fa6d7e94c Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Wed, 9 Dec 2015 23:43:32 -0500 Subject: refactor and fix bugs introduced with new changes --- lib/oxidized/input/ftp.rb | 2 +- lib/oxidized/input/ssh.rb | 2 +- lib/oxidized/input/telnet.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/oxidized/input') diff --git a/lib/oxidized/input/ftp.rb b/lib/oxidized/input/ftp.rb index a3d7ac8..93cdb38 100644 --- a/lib/oxidized/input/ftp.rb +++ b/lib/oxidized/input/ftp.rb @@ -28,7 +28,7 @@ module Oxidized end def cmd file - Log.debug "FTP: #{file} @ #{@node.name}" + Oxidized.logger.debug "FTP: #{file} @ #{@node.name}" @ftp.getbinaryfile file, nil end diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index e45adb6..476a786 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -43,7 +43,7 @@ module Oxidized end def cmd cmd, expect=node.prompt - Log.debug "SSH: #{cmd} @ #{node.name}" + Oxidized.logger.debug "SSH: #{cmd} @ #{node.name}" if @exec @ssh.exec! cmd else diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index b92d703..e9fd7d9 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -37,7 +37,7 @@ module Oxidized end def cmd cmd, expect=@node.prompt - Log.debug "Telnet: #{cmd} @#{@node.name}" + Oxidized.logger.debug "Telnet: #{cmd} @#{@node.name}" args = { 'String' => cmd } args.merge!({ 'Match' => expect, 'Timeout' => @timeout }) if expect @telnet.cmd args -- cgit v1.2.1