1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 21:58:12 +09:00

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

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',