refactor(core): Modernize logger service (#11031)

This commit is contained in:
Iván Ovejero
2024-10-01 12:16:09 +02:00
committed by GitHub
parent f92637a9fe
commit 3a9c65e1cb
120 changed files with 554 additions and 297 deletions
@@ -12,7 +12,7 @@ import { mockInstance, mockEntityManager } from '@test/mocking';
describe('ExecutionRepository', () => {
const entityManager = mockEntityManager(ExecutionEntity);
const globalConfig = mockInstance(GlobalConfig);
const globalConfig = mockInstance(GlobalConfig, { logging: { outputs: ['console'] } });
const binaryDataService = mockInstance(BinaryDataService);
const executionRepository = Container.get(ExecutionRepository);
const mockDate = new Date('2023-12-28 12:34:56.789Z');
@@ -47,7 +47,7 @@ import type {
IExecutionFlattedDb,
IExecutionResponse,
} from '@/interfaces';
import { Logger } from '@/logger';
import { Logger } from '@/logging/logger.service';
import { separate } from '@/utils';
import { ExecutionDataRepository } from './execution-data.repository';
@@ -3,7 +3,7 @@ import { EventSubscriber } from '@n8n/typeorm';
import { ApplicationError, ErrorReporterProxy } from 'n8n-workflow';
import { Container } from 'typedi';
import { Logger } from '@/logger';
import { Logger } from '@/logging/logger.service';
import { Project } from '../entities/project';
import { User } from '../entities/user';
+1 -1
View File
@@ -1,7 +1,7 @@
import type { QueryRunner, ObjectLiteral } from '@n8n/typeorm';
import type { INodeTypes } from 'n8n-workflow';
import type { Logger } from '@/logger';
import type { Logger } from '@/logging/logger.service';
import type { createSchemaBuilder } from './dsl';
@@ -9,7 +9,7 @@ import { Container } from 'typedi';
import { inTest } from '@/constants';
import { createSchemaBuilder } from '@/databases/dsl';
import type { BaseMigration, Migration, MigrationContext, MigrationFn } from '@/databases/types';
import { Logger } from '@/logger';
import { Logger } from '@/logging/logger.service';
import { NodeTypes } from '@/node-types';
const PERSONALIZATION_SURVEY_FILENAME = 'personalizationSurvey.json';