From 51d7dda5a726fd612eb71a85094217006faddacd Mon Sep 17 00:00:00 2001 From: Andrew Darqui Date: Tue, 1 Oct 2013 22:38:13 -0400 Subject: [PATCH] added basic logger using config.json --- src/webserver.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webserver.js b/src/webserver.js index a134a4ac58..7212d3d235 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -79,6 +79,9 @@ var express = require('express'), function(next) { // Pre-router middlewares app.use(express.compress()); + if(nconf.get("express:logger") == true) { + app.use(express.logger()); + } app.use(express.favicon(path.join(__dirname, '../', 'public', 'favicon.ico'))); app.use(require('less-middleware')({ src: path.join(__dirname, '../', 'public'), @@ -544,4 +547,4 @@ var express = require('express'), }(WebServer)); -global.server = server; \ No newline at end of file +global.server = server;