revert: log

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-05-29 16:41:08 +09:00
parent e4d3a66f62
commit 55ce6f831a
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
2 changed files with 3 additions and 2 deletions

View File

@ -107,6 +107,7 @@ export const miRepository = {
.select('*')
.from<ObjectLiteral>(this.metadata.tableName, this.metadata.tableName);
builder.expressionMap.aliases.splice(1, 1);
console.log(builder.getQueryAndParameters());
if (findOptions) {
return await builder.setFindOptions(findOptions).getOneOrFail();
}

View File

@ -243,8 +243,8 @@ export function createPostgresDataSource(config: Config) {
},
} : false,
logging: log,
logger: log ? process.env.NODE_ENV === 'test' ? 'advanced-console' : new MyCustomLogger() : undefined,
maxQueryExecutionTime: log ? 0 : 300,
logger: log ? new MyCustomLogger() : undefined,
maxQueryExecutionTime: 300,
entities: entities,
migrations: ['../../migration/*.js'],
});