mirror of
https://github.com/status-im/codimd.git
synced 2025-01-11 08:46:02 +00:00
c3584770f2
Our log library got a new major version which should be implemented. That's exactly what this patch does. Implementing the new version of the logging library. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
20 lines
434 B
JavaScript
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
|
|
})
|