4da68597f7
Since we are about to release it's time to finally fix our linting. This patch basically runs eslint --fix and does some further manual fixes. Also it sets up eslint to fail on every warning on order to make warnings visable in the CI process. There should no functional change be introduced. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
27 lines
549 B
JavaScript
27 lines
549 B
JavaScript
'use strict'
|
|
const { createLogger, format, transports } = require('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
|
|
})
|
|
|
|
logger.stream = {
|
|
write: function (message, encoding) {
|
|
logger.info(message)
|
|
}
|
|
}
|
|
|
|
module.exports = logger
|