HackMD/lib/logger.js
BoHong Li 4889e9732d Use JavaScript Standard Style
Introduce JavaScript Standard Style as project style rule,
and fixed all fail on backend code.
2017-03-08 18:45:51 +08:00

22 lines
418 B
JavaScript

var winston = require('winston')
winston.emitErrs = true
var logger = new winston.Logger({
transports: [
new winston.transports.Console({
level: 'debug',
handleExceptions: true,
json: false,
colorize: true,
timestamp: true
})
],
exitOnError: false
})
module.exports = logger
module.exports.stream = {
write: function (message, encoding) {
logger.info(message)
}
}