@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
27 lines (26 loc) • 1.33 kB
TypeScript
import { Logger } from './logger';
import { LogLevel, LoggerConfig } from './types';
export declare class LoggerManager {
private static instance;
private globalConfig;
private loggers;
private constructor();
static getInstance(): LoggerManager;
setGlobalConfig(config: Partial<LoggerConfig>): void;
getGlobalConfig(): LoggerConfig;
getLogger(domain: string, additionalFields?: Record<string, any>): Logger;
getComponentLogger(domain: string, component: string, additionalFields?: Record<string, any>): Logger;
clearCache(): void;
getCachedDomains(): string[];
setLogLevel(level: LogLevel): void;
setCallerEnabled(enabled: boolean): void;
setJsonFormat(enabled: boolean): void;
}
declare const globalLoggerManager: LoggerManager;
export declare function initLogger(config: Partial<LoggerConfig>): void;
export declare function getDomainLogger(domain: string, additionalFields?: Record<string, any>): Logger;
export declare function getComponentLogger(domain: string, component: string, additionalFields?: Record<string, any>): Logger;
export declare function setGlobalLogLevel(level: LogLevel): void;
export declare function setGlobalCallerEnabled(enabled: boolean): void;
export declare function setGlobalJsonFormat(enabled: boolean): void;
export { globalLoggerManager };