worktree-tool
Version:
A command-line tool for managing Git worktrees with integrated tmux/shell session management
65 lines • 1.85 kB
TypeScript
import { GlobalOptions, LogLevel } from "../core/types.js";
/**
* Logger class for handling different levels of output.
* Supports quiet, normal, and verbose modes.
*/
export declare class Logger {
private level;
/**
* Creates a new Logger instance.
*
* @param options - Global options to determine log level
*/
constructor(options?: GlobalOptions);
/**
* Log an error message (always shown)
*/
error(message: string): void;
/**
* Log a success message (shown in normal and verbose modes)
*/
success(message: string): void;
/**
* Log an info message (shown in normal and verbose modes)
*/
info(message: string): void;
/**
* Log a warning message (shown in normal and verbose modes)
*/
warn(message: string): void;
/**
* Log a verbose message (only shown in verbose mode)
*/
verbose(message: string): void;
/**
* Log a plain message (shown in normal and verbose modes)
*/
log(message: string): void;
/**
* Start a progress indicator (shown in normal and verbose modes)
* @returns A function to stop the progress indicator
*/
progress(message: string): () => void;
/**
* Get the current log level
*/
getLevel(): LogLevel;
}
/**
* Get or create the logger instance.
* Uses singleton pattern to ensure consistent logging throughout the application.
*
* @param options - Global options to configure the logger
* @returns The Logger instance
*
* @example
* ```typescript
* const logger = getLogger({ verbose: true });
* logger.info("This is a verbose message");
*
* const quietLogger = getLogger({ quiet: true });
* quietLogger.error("Only errors are shown in quiet mode");
* ```
*/
export declare function getLogger(options?: GlobalOptions): Logger;
//# sourceMappingURL=logger.d.ts.map