From 227ea783d3598c2bd974cdaf4aac8c255870e264 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 10 Feb 2014 12:26:59 +0200 Subject: Handle exceptions with different log levels --- lib/oxidized/input/ssh.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/oxidized/input/ssh.rb') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 3fdaa70..67be180 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -2,11 +2,15 @@ module Oxidized require 'net/ssh' require 'oxidized/input/cli' class SSH < Input - RescueFail = [ - Net::SSH::Disconnect, - Net::SSH::AuthenticationFailed, - RuntimeError, - ] + RescueFail = { + :debug => [ + Net::SSH::Disconnect, + ], + :warn => [ + RuntimeError, + Net::SSH::AuthenticationFailed, + ], + } include CLI class NoShell < StandardError; end -- cgit v1.2.1