codimd/lib/logger.js

22 lines
473 B
JavaScript
Raw Normal View History

2015-06-01 10:04:25 +00:00
var winston = require('winston');
winston.emitErrs = true;
var logger = new winston.Logger({
transports: [
new winston.transports.Console({
level: 'debug',
handleExceptions: true,
json: false,
2015-07-01 16:10:20 +00:00
colorize: true,
timestamp: true
2015-06-01 10:04:25 +00:00
})
],
exitOnError: false
});
module.exports = logger;
module.exports.stream = {
write: function(message, encoding){
logger.info(message);
}
};