2015-11-01 23:46:24 -06:00
|
|
|
var winston = require('winston');
|
|
|
|
|
|
|
|
winston.remove(winston.transports.Console);
|
|
|
|
|
|
|
|
winston.add(winston.transports.File, {
|
|
|
|
filename: 'minetrack.log'
|
|
|
|
});
|
2015-11-02 01:04:49 -06:00
|
|
|
|
2015-11-01 23:46:24 -06:00
|
|
|
winston.add(winston.transports.Console, {
|
|
|
|
'timestamp': function() {
|
|
|
|
var date = new Date();
|
2015-11-02 00:01:04 -06:00
|
|
|
|
|
|
|
return date.toLocaleTimeString() + ' ' + date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear().toString().substring(2, 4);
|
2015-11-01 23:46:24 -06:00
|
|
|
},
|
|
|
|
'colorize': true
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = winston;
|