From d402737a7531d82a58297de41c98ecb3d93184d9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 2 Sep 2015 18:41:05 -0400 Subject: [PATCH] add file transport --- install/web.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install/web.js b/install/web.js index 557fcef862..7d2cfad21a 100644 --- a/install/web.js +++ b/install/web.js @@ -12,6 +12,16 @@ var winston = require('winston'), app = express(), server; +winston.add(winston.transports.File, { + filename: 'logs/webinstall.log', + colorize: true, + timestamp: function() { + var date = new Date(); + return date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0,5) + ' [' + global.process.pid + ']'; + }, + level: 'verbose' +}); + var web = {}, scripts = [ 'public/vendor/xregexp/xregexp.js', @@ -78,8 +88,6 @@ function install(req, res) { } } - winston.info('running nodebb setup with env ', process.env); - var child = require('child_process').fork('app', ['--setup'], { env: process.env });