mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
refactor(core): Move Logger to core (no-changelog) (#12310)
This commit is contained in:
committed by
GitHub
parent
b4c77f27b6
commit
471d7b9420
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user