revit-cli
Version:
A scalable CLI tool for Revit communication and data manipulation
88 lines • 2.18 kB
TypeScript
import { ILogger } from '../types';
/**
* Logger utility for consistent logging across the CLI
*/
export declare class Logger implements ILogger {
private level;
private logFile?;
private levels;
constructor(level?: string, logFile?: string);
/**
* Set the logging level
*/
setLevel(level: string): void;
/**
* Set the log file path
*/
setLogFile(filePath: string): Promise<void>;
/**
* Check if a message should be logged based on current level
*/
private shouldLog;
/**
* Format a log message with timestamp and level
*/
private formatMessage;
/**
* Write message to log file if configured
*/
private writeToFile;
/**
* Log a debug message
*/
debug(message: string, ...args: any[]): void;
/**
* Log an info message
*/
info(message: string, ...args: any[]): void;
/**
* Log a warning message
*/
warn(message: string, ...args: any[]): void;
/**
* Log an error message
*/
error(message: string, ...args: any[]): void;
/**
* Log a success message (always shown)
*/
success(message: string, ...args: any[]): void;
/**
* Log a message with custom color
*/
custom(color: string, level: string, message: string, ...args: any[]): void;
/**
* Create a child logger with a prefix
*/
child(prefix: string): Logger;
/**
* Log a table of data
*/
table(data: Record<string, any>[] | Record<string, any>): void;
/**
* Log a progress indicator
*/
progress(message: string, current: number, total: number): void;
/**
* Clear the current line (useful after progress)
*/
clearLine(): void;
/**
* Log a separator line
*/
separator(char?: string, length?: number): void;
/**
* Log a header with decorative formatting
*/
header(title: string): void;
/**
* Get current log level
*/
getLevel(): string;
/**
* Get log file path
*/
getLogFile(): string | undefined;
}
export declare const logger: Logger;
//# sourceMappingURL=logger.d.ts.map