codimd/lib/logger.js

24 lines
431 B
JavaScript
Raw Normal View History

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