You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/02/24 13:50:44 UTC
[whimsy.git] [1/1] Commit 52cc41d: append the severity so can track more problems
Commit 52cc41d66d17040abec6dee2b5ae0c2b02e85238:
append the severity so can track more problems
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
www/status/monitors/public_json.rb | ++++++ --
------------------------------------------------------------
8 changes: 6 additions, 2 deletions.
------------------------------------------------------------
diff --git a/www/status/monitors/public_json.rb b/www/status/monitors/public_json.rb
index 3b7bcaa..50fd3de 100644
--- a/www/status/monitors/public_json.rb
+++ b/www/status/monitors/public_json.rb
@@ -76,8 +76,12 @@ def Monitor.public_json(previous_status)
}
end
- if status[name][:level] and status[name][:level] != 'info'
- FileUtils.copy log, archive,
+ # Save a copy of the log
+ # append the severity so can track more problems
+ lvl = status[name][:level]
+ if lvl and lvl != 'info'
+ name = File.basename(log)
+ FileUtils.copy log, File.join(archive, name + '.' + lvl),
preserve: true
end
end