refactor(core): Move Logger to core (no-changelog) (#12310)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-23 13:46:13 +01:00
committed by GitHub
parent b4c77f27b6
commit 471d7b9420
142 changed files with 328 additions and 302 deletions

View File

@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { CallbackManager as CallbackManagerLC } from '@langchain/core/callbacks/manager';
import type { LogScope } from '@n8n/config';
import type { AxiosProxyConfig, GenericAbortSignal } from 'axios';
import type * as express from 'express';
import type FormData from 'form-data';
@@ -675,6 +675,7 @@ export type ICredentialTestFunction = (
) => Promise<INodeCredentialTestResult>;
export interface ICredentialTestFunctions {
logger: Logger;
helpers: SSHTunnelFunctions & {
request: (uriOrObject: string | object, options?: object) => Promise<any>;
};
@@ -2447,7 +2448,17 @@ export interface WorkflowTestData {
}
export type LogLevel = (typeof LOG_LEVELS)[number];
export type Logger = Record<Exclude<LogLevel, 'silent'>, (message: string, meta?: object) => void>;
export type LogMetadata = {
[key: string]: unknown;
scopes?: LogScope[];
file?: string;
function?: string;
};
export type Logger = Record<
Exclude<LogLevel, 'silent'>,
(message: string, metadata?: LogMetadata) => void
>;
export type LogLocationMetadata = Pick<LogMetadata, 'file' | 'function'>;
export interface IStatusCodeMessages {
[key: string]: string;