From 0c4b8385d16d32fcf1cd0ef19e0f0edc8a4c312e Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Thu, 22 Sep 2011 16:34:26 -0600
Subject: [PATCH] document how to set up log rotation in DEPLOYMENT.md.  issue
 #119

---
 DEPLOYMENT.md | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md
index c9b9a07ad..07fe7cb6e 100644
--- a/DEPLOYMENT.md
+++ b/DEPLOYMENT.md
@@ -277,7 +277,22 @@ server {
 }
 </pre>
 
-  5. restart your webserver and you're all done: `sudo /etc/init.d/nginx restart
+  5. restart your webserver: `sudo /etc/init.d/nginx restart
+
+### 6. set up log rotation
+
+create a file as root at `/etc/logrotate.d/browserid`:
+
+    /home/browserid/var/log/browserid.log /home/browserid/var/log/browserid-metrics.json /home/browserid/var/log/verifier.log /home/browserid/var/log/verifier-metrics.json {
+        daily
+        rotate 30
+        copytruncate
+        dateext
+        compress
+        dateformat -%Y-%m-%d
+    }
+
+Now your logfiles will be automatically rotated.
 
 easy, right?
 
-- 
GitLab