Commit 52cc41d66d17040abec6dee2b5ae0c2b02e85238:
append the severity so can track more problems
Branch: refs/heads/master
Author: Sebb <[email protected]>
Committer: Sebb <[email protected]>
Pusher: sebb <[email protected]>
------------------------------------------------------------
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