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