summaryrefslogtreecommitdiff
path: root/lib/oxidized/input/input.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-02-10 12:26:59 +0200
committerSaku Ytti <saku@ytti.fi>2014-02-10 12:26:59 +0200
commit227ea783d3598c2bd974cdaf4aac8c255870e264 (patch)
treeac3af5a9473fb06bda8bbbb6a30c01c453f0dfe8 /lib/oxidized/input/input.rb
parent92fbaa712c99ae5b523be0ebbc46fca9cdddef4e (diff)
Handle exceptions with different log levels
Diffstat (limited to 'lib/oxidized/input/input.rb')
-rw-r--r--lib/oxidized/input/input.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/oxidized/input/input.rb b/lib/oxidized/input/input.rb
index d59c4f3..61f4634 100644
--- a/lib/oxidized/input/input.rb
+++ b/lib/oxidized/input/input.rb
@@ -1,12 +1,16 @@
module Oxidized
class Input
- RescueFail = [
- Timeout::Error,
- Errno::ECONNREFUSED,
- Errno::ECONNRESET,
- Errno::EHOSTUNREACH,
- Errno::EPIPE,
- ]
+ RescueFail = {
+ :debug => [
+ Errno::ECONNREFUSED,
+ ],
+ :warn => [
+ Timeout::Error,
+ Errno::ECONNRESET,
+ Errno::EHOSTUNREACH,
+ Errno::EPIPE,
+ ],
+ }
class << self
def inherited klass
Oxidized.mgr.loader = { :class => klass }