spec(backend): severityのラベルをJSON形式のログに追加 (MisskeyIO#425)

This commit is contained in:
まっちゃとーにゅ 2024-02-10 00:14:44 +09:00 committed by GitHub
parent 258a17cb64
commit 235d8d9433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ export default class Logger {
timestamp: envOption.withLogTime || envOption.logJson ? pino.stdTimeFunctions.isoTime : false,
messageKey: 'message',
errorKey: 'error',
formatters: {
level: (label, number) => ({ severity: label, level: number }),
},
mixin: () => ({ cluster: cluster.isPrimary ? 'primary' : `worker#${cluster.worker!.id}` }),
transport: !envOption.logJson ? {
target: 'pino-pretty',