From 24fd35e03dcfa9062f417c19f77fa14aa0b768d1 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Fri, 11 Oct 2024 09:44:12 -0400 Subject: [PATCH] revert accidental change to postgres.ts --- packages/backend/src/postgres.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/backend/src/postgres.ts b/packages/backend/src/postgres.ts index eaa0eac57c..2d66e6e445 100644 --- a/packages/backend/src/postgres.ts +++ b/packages/backend/src/postgres.ts @@ -92,8 +92,6 @@ export const dbLogger = new MisskeyLogger('db'); const sqlLogger = dbLogger.createSubLogger('sql', 'gray'); class MyCustomLogger implements Logger { - private readonly isDevelopment = process.env.NODE_ENV === 'development'; - @bindThis private highlight(sql: string) { return highlight.highlight(sql, { @@ -103,13 +101,7 @@ class MyCustomLogger implements Logger { @bindThis public logQuery(query: string, parameters?: any[]) { - let message = this.highlight(query); - - if (!this.isDevelopment) { - message = message.substring(0, 100); - } - - sqlLogger.info(message); + sqlLogger.info(this.highlight(query).substring(0, 100)); } @bindThis