mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 12:08:02 -05:00
7b9f9a487b
Signed-off-by: David Mehren <git@herrmehren.de>
20 lines
435 B
TypeScript
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 }
|