diff --git a/backend/src/typeorm/connection.ts b/backend/src/typeorm/connection.ts index 2793ec14e..25c47b8dc 100644 --- a/backend/src/typeorm/connection.ts +++ b/backend/src/typeorm/connection.ts @@ -39,7 +39,7 @@ export class Connection { synchronize: false, logging: true, logger: new FileLogger('all', { - logPath: path.resolve(__dirname, CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), + logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), }), extra: { charset: 'utf8mb4_unicode_ci', diff --git a/dht-node/src/typeorm/connection.ts b/dht-node/src/typeorm/connection.ts index 6348f38da..abac05b38 100644 --- a/dht-node/src/typeorm/connection.ts +++ b/dht-node/src/typeorm/connection.ts @@ -19,7 +19,7 @@ export const connection = async (): Promise => { synchronize: false, logging: true, logger: new FileLogger('all', { - logPath: path.resolve(__dirname, CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), + logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), }), extra: { charset: 'utf8mb4_unicode_ci', diff --git a/federation/src/typeorm/connection.ts b/federation/src/typeorm/connection.ts index d5ff19179..91449d4de 100644 --- a/federation/src/typeorm/connection.ts +++ b/federation/src/typeorm/connection.ts @@ -19,7 +19,7 @@ const connection = async (): Promise => { synchronize: false, logging: true, logger: new FileLogger('all', { - logPath: path.resolve(__dirname, CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), + logPath: path.resolve(process.cwd(), CONFIG.TYPEORM_LOGGING_RELATIVE_PATH), }), extra: { charset: 'utf8mb4_unicode_ci',