hedgedoc/lib/logger.js

22 lines
473 B
JavaScript
Raw Normal View History

2015-06-01 06:04:25 -04: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 12:10:20 -04:00
colorize: true,
timestamp: true
2015-06-01 06:04:25 -04:00
})
],
exitOnError: false
});
module.exports = logger;
module.exports.stream = {
write: function(message, encoding){
logger.info(message);
}
};