summaryrefslogtreecommitdiff
path: root/lib/oxidized/node.rb
diff options
context:
space:
mode:
authorMarno van der Molen <marnovandermolen@acknowledge.nl>2015-11-03 08:30:44 +0100
committerMarno van der Molen <marnovandermolen@acknowledge.nl>2015-11-03 08:30:44 +0100
commitf04ada741166c7c2cd5f9eee29a89127fab1f328 (patch)
tree2268a6b2683882309909480fa87e02b8ac1c344e /lib/oxidized/node.rb
parenta9996e8115bafd9837672c26dc9b76cbf3696840 (diff)
Log crashes on node name instead of ip to ease troubleshooting
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r--lib/oxidized/node.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb
index c847416..974b2d1 100644
--- a/lib/oxidized/node.rb
+++ b/lib/oxidized/node.rb
@@ -70,7 +70,7 @@ module Oxidized
Log.send(level, '%s raised %s%s with msg "%s"' % [self.ip, err.class, resc, err.message])
return false
rescue => err
- file = Oxidized::Config::Crash + '.' + self.ip.to_s
+ file = Oxidized::Config::Crash + '.' + opt[:name]
open file, 'w' do |fh|
fh.puts Time.now.utc
fh.puts err.message + ' [' + err.class.to_s + ']'