From a9732803e707f7e3f7554ca48e23bcd2f0766746 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Mon, 2 May 2011 19:11:48 -0600
Subject: [PATCH] standalone.jses log to file

---
 authority/server/standalone.js | 5 ++++-
 primary/server/standalone.js   | 5 ++++-
 verifier/server/standalone.js  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/authority/server/standalone.js b/authority/server/standalone.js
index 41d770391..9486beea7 100644
--- a/authority/server/standalone.js
+++ b/authority/server/standalone.js
@@ -53,7 +53,10 @@ function serveFile(filename, response) {
 }
 
 var server = connect.createServer().use(connect.favicon())
-    .use(connect.logger({format: ":status :method :remote-addr :response-time :url"}));
+    .use(connect.logger({
+        format: ":status :method :remote-addr :response-time :url",
+        stream: fs.createWriteStream(path.join(__dirname, "server.log"))
+    }));
 
 // let the specific server interact directly with the connect server to register their middleware 
 if (handler.setup) handler.setup(server);
diff --git a/primary/server/standalone.js b/primary/server/standalone.js
index 23c51417e..8caedb854 100644
--- a/primary/server/standalone.js
+++ b/primary/server/standalone.js
@@ -53,7 +53,10 @@ function serveFile(filename, response) {
 }
 
 var server = connect.createServer().use(connect.favicon())
-    .use(connect.logger({format: ":status :method :remote-addr :response-time :url"}));
+    .use(connect.logger({
+        format: ":status :method :remote-addr :response-time :url",
+        stream: fs.createWriteStream(path.join(__dirname, "server.log"))
+    }));
 
 // let the specific server interact directly with the connect server to register their middleware 
 if (handler.setup) handler.setup(server);
diff --git a/verifier/server/standalone.js b/verifier/server/standalone.js
index 7d386c274..a76e6d226 100644
--- a/verifier/server/standalone.js
+++ b/verifier/server/standalone.js
@@ -53,7 +53,10 @@ function serveFile(filename, response) {
 }
 
 var server = connect.createServer().use(connect.favicon())
-    .use(connect.logger({format: ":status :method :remote-addr :response-time :url"}));
+    .use(connect.logger({
+        format: ":status :method :remote-addr :response-time :url",
+        stream: fs.createWriteStream(path.join(__dirname, "server.log"))
+    }));
 
 // let the specific server interact directly with the connect server to register their middleware 
 if (handler.setup) handler.setup(server);
-- 
GitLab