@typecad/jlcpcb-parts
Version:
Intelligent fuzzy search for JLCPCB electrical components with CLI interface
73 lines • 1.92 kB
TypeScript
/**
* Log levels for the Logger
*/
export declare enum LogLevel {
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3,
NONE = 4
}
/**
* Configuration options for the Logger
*/
export interface LoggerOptions {
/**
* Minimum log level to display in the console (default: INFO)
*/
consoleLevel?: LogLevel;
/**
* Whether to include timestamps in log messages (default: true)
*/
includeTimestamps?: boolean;
}
/**
* Logger class for debugging and monitoring
*/
export declare class Logger {
private static instance;
private readonly options;
/**
* Creates a new Logger instance with sensible defaults
* @param options - Configuration options for the Logger
*/
private constructor();
/**
* Gets the Logger instance (singleton)
* @param options - Configuration options for the Logger (only used on first call)
* @returns The Logger instance
*/
static getInstance(options?: LoggerOptions): Logger;
/**
* Logs a debug message
* @param message - Message to log
* @param data - Additional data to log
*/
debug(message: string, data?: any): void;
/**
* Logs an info message
* @param message - Message to log
* @param data - Additional data to log
*/
info(message: string, data?: any): void;
/**
* Logs a warning message
* @param message - Message to log
* @param data - Additional data to log
*/
warn(message: string, data?: any): void;
/**
* Logs an error message
* @param message - Message to log
* @param error - Error to log
*/
error(message: string, error?: unknown): void;
/**
* Logs a message with the specified level
* @param level - Log level
* @param message - Message to log
* @param data - Additional data to log
*/
private log;
}
//# sourceMappingURL=Logger.d.ts.map