hedgedoc/old_src/lib/logger.ts
David Mehren 7b9f9a487b
Move old backend code to old_src folder
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-20 19:43:05 +02:00

20 lines
435 B
TypeScript

import { createLogger, format, transports } from 'winston'
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 }