updating winston timestamp

This commit is contained in:
psychobunny
2014-11-13 13:52:46 -05:00
parent b3544f644a
commit a8402b228c

5
app.js
View File

@@ -38,7 +38,10 @@ global.env = process.env.NODE_ENV || 'production';
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {
colorize: true,
timestamp: true,
timestamp: function() {
var date = new Date;
return date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.getHours() + ':' + date.getMinutes() + ' [' + global.process.pid + ']';
},
level: global.env === 'production' ? 'info' : 'verbose'
});