@notjustcoders/ioc-arise
Version:
Arise type-safe IoC containers from your code. Zero overhead, zero coupling.
93 lines • 2.33 kB
TypeScript
/**
* Logger utility for CLI output
* Provides consistent, production-ready logging with support for verbose mode and colors
*/
export declare enum LogLevel {
ERROR = 0,
WARN = 1,
INFO = 2,
SUCCESS = 3,
DEBUG = 4
}
export declare class Logger {
private static verbose;
private static silent;
private static colorsEnabled;
/**
* Initialize logger with options
*/
static initialize(options?: {
verbose?: boolean;
silent?: boolean;
colors?: boolean;
}): void;
/**
* Apply color to text
*/
private static colorize;
/**
* Log an error message
*/
static error(message: string, ...args: unknown[]): void;
/**
* Log a warning message
*/
static warn(message: string, ...args: unknown[]): void;
/**
* Log an info message
*/
static info(message: string, ...args: unknown[]): void;
/**
* Log a success message
*/
static success(message: string, ...args: unknown[]): void;
/**
* Log a debug message (only shown in verbose mode)
*/
static debug(message: string, ...args: unknown[]): void;
/**
* Log a plain message without prefix (for structured output)
*/
static log(message: string, ...args: unknown[]): void;
/**
* Log a message with custom emoji/prefix and optional color
*/
static custom(prefix: string, message: string, color?: string, ...args: unknown[]): void;
/**
* Log a section header
*/
static section(title: string): void;
/**
* Log a newline
*/
static newline(): void;
/**
* Format error for display
*/
static formatError(error: unknown): string;
/**
* Check if verbose mode is enabled
*/
static isVerbose(): boolean;
/**
* Colorize text (public method for advanced usage)
*/
static colorizeText(text: string, color: string): string;
/**
* Get color codes (for advanced usage)
*/
static getColors(): {
reset: string;
bright: string;
dim: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
};
}
//# sourceMappingURL=logger.d.ts.map