show seconds in logs

This commit is contained in:
Barış Soner Uşaklı
2016-12-09 00:41:19 +03:00
parent e0501656b6
commit 7f455344d8

2
app.js
View File

@@ -37,7 +37,7 @@ winston.add(winston.transports.Console, {
colorize: true,
timestamp: function () {
var date = new Date();
return (!!nconf.get('json-logging')) ? date.toJSON() : date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0,5) + ' [' + global.process.pid + ']';
return (!!nconf.get('json-logging')) ? date.toJSON() : date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0,8) + ' [' + global.process.pid + ']';
},
level: nconf.get('log-level') || (global.env === 'production' ? 'info' : 'verbose'),
json: (!!nconf.get('json-logging')),