spec(backend): severityのラベルをJSON形式のログに追加 (MisskeyIO#425)
This commit is contained in:
parent
258a17cb64
commit
235d8d9433
|
@ -31,6 +31,9 @@ export default class Logger {
|
||||||
timestamp: envOption.withLogTime || envOption.logJson ? pino.stdTimeFunctions.isoTime : false,
|
timestamp: envOption.withLogTime || envOption.logJson ? pino.stdTimeFunctions.isoTime : false,
|
||||||
messageKey: 'message',
|
messageKey: 'message',
|
||||||
errorKey: 'error',
|
errorKey: 'error',
|
||||||
|
formatters: {
|
||||||
|
level: (label, number) => ({ severity: label, level: number }),
|
||||||
|
},
|
||||||
mixin: () => ({ cluster: cluster.isPrimary ? 'primary' : `worker#${cluster.worker!.id}` }),
|
mixin: () => ({ cluster: cluster.isPrimary ? 'primary' : `worker#${cluster.worker!.id}` }),
|
||||||
transport: !envOption.logJson ? {
|
transport: !envOption.logJson ? {
|
||||||
target: 'pino-pretty',
|
target: 'pino-pretty',
|
||||||
|
|
Loading…
Reference in a new issue