mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
chore: application prettier
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const pino = require('pino')
|
||||
const pino = require('pino');
|
||||
|
||||
const PinoLevelToSeverityLookup = {
|
||||
trace: 'DEBUG',
|
||||
@ -9,20 +9,23 @@ const PinoLevelToSeverityLookup = {
|
||||
fatal: 'CRITICAL',
|
||||
};
|
||||
|
||||
const logger = defaultConfig =>
|
||||
const logger = (defaultConfig) =>
|
||||
pino({
|
||||
...defaultConfig,
|
||||
messageKey: 'message',
|
||||
formatters: {
|
||||
level(label, number) {
|
||||
return {
|
||||
severity: PinoLevelToSeverityLookup[label] || PinoLevelToSeverityLookup['info'],
|
||||
level: number,
|
||||
}
|
||||
},},
|
||||
level(label, number) {
|
||||
return {
|
||||
severity:
|
||||
PinoLevelToSeverityLookup[label] ||
|
||||
PinoLevelToSeverityLookup['info'],
|
||||
level: number,
|
||||
};
|
||||
},
|
||||
},
|
||||
mixin: () => ({ name: 'custom-pino-instance' }),
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
logger,
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user