refactor: logger (#16393)

This commit is contained in:
Jason Rasmussen 2025-02-27 14:59:50 -05:00 committed by GitHub
parent 1c86293035
commit fbd85a89e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 153 additions and 86 deletions

View file

@ -6,6 +6,7 @@ import { Test } from '@nestjs/testing';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ClassConstructor } from 'class-transformer';
import { PostgresJSDialect } from 'kysely-postgres-js';
import { ClsModule } from 'nestjs-cls';
import { KyselyModule } from 'nestjs-kysely';
import { OpenTelemetryModule } from 'nestjs-otel';
import { mkdir, rm, writeFile } from 'node:fs/promises';
@ -77,7 +78,7 @@ class SqlGenerator {
await mkdir(this.options.targetDir);
process.env.DB_HOSTNAME = 'localhost';
const { database, otel } = new ConfigRepository().getEnv();
const { database, cls, otel } = new ConfigRepository().getEnv();
const moduleFixture = await Test.createTestingModule({
imports: [
@ -92,6 +93,7 @@ class SqlGenerator {
}
},
}),
ClsModule.forRoot(cls.config),
TypeOrmModule.forRoot({
...database.config.typeorm,
entities,