refactor(core): Make Logger a service (no-changelog) (#7494)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-25 16:35:22 +02:00
committed by GitHub
parent db4e61ba24
commit 05586a900d
131 changed files with 761 additions and 919 deletions

View File

@@ -39,7 +39,6 @@ import {
createDeferredPromise,
ErrorReporterProxy as ErrorReporter,
FORM_TRIGGER_PATH_IDENTIFIER,
LoggerProxy as Logger,
NodeHelpers,
} from 'n8n-workflow';
@@ -64,6 +63,7 @@ import { EventsService } from '@/services/events.service';
import { OwnershipService } from './services/ownership.service';
import { parseBody } from './middlewares';
import { WorkflowsService } from './workflows/workflows.services';
import { Logger } from './Logger';
const pipeline = promisify(stream.pipeline);
@@ -534,7 +534,7 @@ export async function executeWebhook(
})
.catch(async (error) => {
ErrorReporter.error(error);
Logger.error(
Container.get(Logger).error(
`Error with Webhook-Response for execution "${executionId}": "${error.message}"`,
{ executionId, workflowId: workflow.id },
);
@@ -551,7 +551,7 @@ export async function executeWebhook(
responsePromise,
);
Logger.verbose(
Container.get(Logger).verbose(
`Started execution of workflow "${workflow.name}" from webhook with execution ID ${executionId}`,
{ executionId },
);