whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 52cc41d: append the severity so can track more problems
Date Wed, 24 Feb 2016 12:50:44 GMT
Commit 52cc41d66d17040abec6dee2b5ae0c2b02e85238:
    append the severity so can track more problems


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@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

Mime
View raw message