mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 18:26:32 -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 }
|