//#region src/common/log/log-base.d.ts type LogLevel = number; declare const LogLevelAll = -1; declare const LogLevelDebug = 0; declare const LogLevelInfo = 1; declare const LogLevelWarn = 2; declare const LogLevelError = 3; declare const LogLevelFatal = 4; declare const LogLevelOff = 9007199254740991; declare const LogLevelAlias: Record; type LogLevelAliasKey = keyof typeof LogLevelAlias; type LogLevelAliasType = number | boolean | LogLevelAliasKey; interface LogMessage { level: LogLevel; name: string; messages: any[]; line?: number; file?: string; timestamp?: number; } type LogMessageCompact = [timestamp: number, level: LogLevel, name: string, ...messages: any[]]; type LogHandler = (msg: LogMessage) => void; interface LoggerInterface { (...messages: any[]): void; /** @deprecated use .level = LogLevel.off or LogLevel.all */ active: boolean; level: LogLevel; generic: (level: LogLevel, ...messages: any[]) => void; debug: (...messages: any[]) => void; info: (...messages: any[]) => void; warn: (...messages: any[]) => void; error: (...messages: any[]) => void; /** * Throws if condition is not truthy. * * **Attention!** Due to a bug in typescript you will need to explicitly set the `LoggerInterface` type in * order to have the assertions having an effect on unreachable code. Example: * * ``` * const log: LoggerInterface = Logger('xxx') * ``` * * Bug https://github.com/microsoft/TypeScript/issues/50363#issuecomment-1219811447 */ assert: (condition: unknown, ...messages: any[]) => asserts condition; /** * Always throws. * * **Attention!** Due to a bug in typescript you will need to explicitly set the `LoggerInterface` type in * order to have the assertions having an effect on unreachable code. Example: * * ``` * const log: LoggerInterface = Logger('xxx') * ``` * * Bug https://github.com/microsoft/TypeScript/issues/50363#issuecomment-1219811447 */ fatal: (...messages: any[]) => never; extend: (prefix: string) => LoggerInterface; factory?: LoggerContextInterface; label: string; } interface LoggerContextInterface { (name?: string, level?: LogLevelAliasType): LoggerInterface; registerHandler: (handler: LogHandler) => void; setFilter: (namespaces: string) => void; setHandlers: (handlers?: (LogHandler | undefined | null)[]) => void; setLock: (lock: boolean) => void; /** When true emits a short log message for each Logger when being set up first time. */ setDebug: (debug: boolean) => void; setLogLevel: (level?: LogLevel) => void; setFactory: (factory: (name?: string) => LoggerInterface) => void; } interface LogHandlerOptions { level?: LogLevel; filter?: string; colors?: boolean; levelHelper?: boolean; nameBrackets?: boolean; padding?: number; fill?: number; stack?: boolean | number; time?: boolean; pretty?: boolean; } //#endregion export { LoggerInterface as _, LogLevelAliasKey as a, LogLevelDebug as c, LogLevelInfo as d, LogLevelOff as f, LoggerContextInterface as g, LogMessageCompact as h, LogLevelAlias as i, LogLevelError as l, LogMessage as m, LogHandlerOptions as n, LogLevelAliasType as o, LogLevelWarn as p, LogLevel as r, LogLevelAll as s, LogHandler as t, LogLevelFatal as u }; //# sourceMappingURL=log-base-BP-JwjKY.d.mts.map