@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
33 lines (32 loc) • 963 B
TypeScript
export declare enum LogLevel {
DEBUG = "debug",
INFO = "info",
WARN = "warn",
ERROR = "error",
FATAL = "fatal"
}
export interface LogEntry {
level: LogLevel;
timestamp: string;
message: string;
caller?: string;
[key: string]: any;
}
export interface LoggerConfig {
level: LogLevel;
enableCaller?: boolean;
jsonFormat?: boolean;
}
export interface Logger {
debug(message: string, ...args: any[]): void;
info(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
error(message: string, ...args: any[]): void;
fatal(message: string, ...args: any[]): void;
debugf(template: string, ...args: any[]): void;
infof(template: string, ...args: any[]): void;
warnf(template: string, ...args: any[]): void;
errorf(template: string, ...args: any[]): void;
fatalf(template: string, ...args: any[]): void;
with(fields: Record<string, any>): Logger;
}