mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 15:42:52 +01:00
Merge pull request #3301 from FokkeZB/patch-1
Allow Winston's log level to be set via nconf
This commit is contained in:
4
app.js
4
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user