mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor: logger (#16393)
This commit is contained in:
parent
1c86293035
commit
fbd85a89e0
10 changed files with 153 additions and 86 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue