From d14cd254a5fafcb55837c1b033dd8ced782ac785 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 3 Dec 2014 17:06:19 -0500 Subject: [PATCH] only instantiating logrotate object if silent --- loader.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/loader.js b/loader.js index 0b5dcb326a..812f8ba15e 100644 --- a/loader.js +++ b/loader.js @@ -30,7 +30,6 @@ var nconf = require('nconf'), }; Loader.init = function(callback) { - if (silent) { console.log = function(value) { output.write(value + '\n'); @@ -186,9 +185,8 @@ function forkWorker(index, isPrimary) { Loader.addWorkerEvents(worker); - var output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }); - if (silent) { + var output = logrotate({ file: __dirname + '/logs/output.log', size: '1m', keep: 3, compress: true }); worker.stdout.pipe(output); worker.stderr.pipe(output); }