revert accidental change to postgres.ts

This commit is contained in:
Hazelnoot 2024-10-11 09:44:12 -04:00
parent e3c79b0c83
commit 24fd35e03d
1 changed files with 1 additions and 9 deletions

View File

@ -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