/**
 * Logger Utility
 *
 * Provides a structured logging framework with level-based filtering.
 * Supports DEBUG, INFO, WARNING, and ERROR levels with configurable
 * minimum log level via the LOG_LEVEL environment variable.
 *
 * Usage:
 *   import { createLogger } from '../utils/logger.js';
 *   const logger = createLogger('service-name');
 *   logger.info('Server started');
 *   logger.debug('Detailed info');
 *   logger.warn('Something unexpected');
 *   logger.error('Something failed', error);
 *
 * Environment:
 *   LOG_LEVEL=DEBUG|INFO|WARNING|ERROR (default: INFO)
 *
 * @module
 */
/**
 * Supported log levels in ascending severity order.
 */
export type LogLevel = 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR';
/**
 * Logger interface with leveled logging methods.
 */
export interface Logger {
    /** Log at DEBUG level — detailed operational info (polling cycles, individual checks, etc.) */
    debug(message: string, ...args: unknown[]): void;
    /** Log at INFO level — key events (server start, agent spawned, plan completed, etc.) */
    info(message: string, ...args: unknown[]): void;
    /** Log at WARNING level — recoverable issues (stale sessions, retry attempts, etc.) */
    warn(message: string, ...args: unknown[]): void;
    /** Log at ERROR level — failures (uncaught errors, failed operations, etc.) */
    error(message: string, ...args: unknown[]): void;
}
/**
 * Resolves the current log level from the LOG_LEVEL environment variable.
 * Falls back to INFO if the variable is not set or invalid.
 *
 * The level is read fresh on each call so changes to process.env.LOG_LEVEL
 * take effect immediately without restart.
 */
export declare function getLogLevel(): LogLevel;
/**
 * Creates a scoped logger instance with the given service name prefix.
 *
 * The logger preserves the existing `[service-name]` prefix convention
 * used throughout the codebase and adds log-level filtering.
 *
 * @param serviceName - The service name used as a prefix (e.g., 'dispatch-daemon')
 * @returns A Logger instance with debug/info/warn/error methods
 *
 * @example
 * ```ts
 * const logger = createLogger('dispatch-daemon');
 * logger.info('Started polling');
 * // Output: [dispatch-daemon] Started polling
 *
 * logger.debug('Checking worker availability');
 * // Only shown when LOG_LEVEL=DEBUG
 * ```
 */
export declare function createLogger(serviceName: string): Logger;
//# sourceMappingURL=logger.d.ts.map