HackMD/lib/logger.js

23 lines
418 B
JavaScript
Raw Normal View History

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)
}
}