From 235d8d94338900339e88c1398920ea4032ec7863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 10 Feb 2024 00:14:44 +0900 Subject: [PATCH] =?UTF-8?q?spec(backend):=20severity=E3=81=AE=E3=83=A9?= =?UTF-8?q?=E3=83=99=E3=83=AB=E3=82=92JSON=E5=BD=A2=E5=BC=8F=E3=81=AE?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=81=AB=E8=BF=BD=E5=8A=A0=20(MisskeyIO#425)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/logger.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/logger.ts b/packages/backend/src/logger.ts index 9d9bca39c5..b95d4db511 100644 --- a/packages/backend/src/logger.ts +++ b/packages/backend/src/logger.ts @@ -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',