hedgedoc/old_src/lib/logger.ts

21 lines
435 B
TypeScript
Raw Normal View History

import { createLogger, format, transports } from 'winston'
2015-06-01 06:04:25 -04:00
const logger = 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
})
export { logger }