UNPKG

@lightninglabs/lnc-web

Version:

Lightning Node Connect npm module for web

61 lines 1.68 kB
export declare enum LogLevel { debug = 1, info = 2, warn = 3, error = 4, none = 5 } /** * A logger class with support for multiple namespaces and log levels. */ export declare class Logger { private _levelToOutput; private _logger; constructor(levelToOutput: LogLevel, namespace: string); /** * Get the current log level */ get level(): LogLevel; /** * creates a new Logger instance by inspecting the executing environment */ static fromEnv(namespace: string): Logger; /** * log a debug message */ debug: (message: string, ...args: unknown[]) => void; /** * log an info message */ info: (message: string, ...args: unknown[]) => void; /** * log a warn message */ warn: (message: string, ...args: unknown[]) => void; /** * log an error message */ error: (message: string, ...args: unknown[]) => void; /** * A shared logging function which will only output logs based on the level of this Logger instance * @param level the level of the message being logged * @param message the message to log * @param args optional additional arguments to log */ private _log; } /** * Create a Logger scoped to a specific class or module name. * The name becomes the debug namespace, enabling targeted filtering * (e.g., DEBUG=SessionManager or DEBUG=Session*). */ export declare function createLogger(name: string): Logger; /** * the main logger for the app */ export declare const log: Logger; /** * the logger for WASM requests and responses */ export declare const wasmLog: Logger; //# sourceMappingURL=log.d.ts.map