codimd/lib/logger.js

20 lines
434 B
JavaScript

'use strict'
const {createLogger, format, transports} = require('winston')
module.exports = createLogger({
level: 'debug',
format: format.combine(
format.uncolorize(),
format.timestamp(),
format.align(),
format.splat(),
format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`)
),
transports: [
new transports.Console({
handleExceptions: true
})
],
exitOnError: false
})