From 4b1c9ce9a2a9e39f25d3e7c08dbe80b22bd56274 Mon Sep 17 00:00:00 2001 From: Fokke Zandbergen Date: Mon, 6 Jul 2015 11:58:17 +0200 Subject: [PATCH] Allow Winston's log level to be set via nconf Defaults to `info` for `production` and `verbose` otherwise, like it used to. --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 78afb10b9e..cd0a566fa4 100644 --- a/app.js +++ b/app.js @@ -43,7 +43,7 @@ winston.add(winston.transports.Console, { var date = new Date(); return date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0,5) + ' [' + global.process.pid + ']'; }, - level: (global.env === 'production' || nconf.get('log-level') === 'info') ? 'info' : 'verbose' + level: nconf.get('log-level') || (global.env === 'production' ? 'info' : 'verbose') }); if(os.platform() === 'linux') { @@ -403,4 +403,4 @@ function restart() { winston.error('[app] Could not restart server. Shutting down.'); shutdown(1); } -} \ No newline at end of file +}