import { Logger } from "tslog"; import type { ILogObj } from "tslog"; /** * Parse the ROLEBOX_LOG_LEVEL env var. * Case-insensitive. Defaults to 3 (info). * Writes to stderr on invalid values. */ export declare function parseLogLevel(raw?: string): number; /** * Resolve the log file path with fallback chain: * 1. ROLEBOX_LOG_FILE env var * 2. ~/.config/rolebox/logs/rolebox.log (via getConfigDir) * 3. {os.tmpdir()}/rolebox.log * Returns null if all options fail (disable file logging). */ export declare function resolveLogFilePath(): string | null; /** * Get the root logger (lazy-initialized on first access). */ export declare function getRootLogger(): Logger; /** Backward-compatible alias: direct access to the root logger singleton. */ export declare const rootLogger: Logger; /** * Create a sub-logger inheriting the root logger's settings. * Sub-logger name is appended to the parent name chain (e.g., "rolebox:MySub"). */ export declare function createSubLogger(name: string, minLevel?: number): Logger; /** * Normalize any error-like value into { message, stack?, name? }. * Handles Error objects, strings, null, undefined, and arbitrary objects. */ export declare function formatError(err: unknown): { message: string; stack?: string; name?: string; }; /** * Returns the resolved log file path, or null if file logging is disabled. */ export declare function getLogFilePath(): string | null; export declare function configureLogDirectory(directory: string): void; /** * Reset the logger singleton (for testing only). * Closes the current transport and clears all cached state, * allowing re-initialization with different env vars. */ export declare function __resetForTest(): void; //# sourceMappingURL=logger.d.ts.map