/** * Global Logger Registry for Agent SDK * * Provides zero-overhead logging access for utility functions and services * without requiring parameter passing. Maintains singleton logger instance * accessible across all SDK modules. * * Features: * - Zero overhead when no logger configured (single null check) * - Thread-safe in Node.js single-threaded environment * - Maintains backward compatibility with existing Logger interface * - Direct function delegation when configured */ import type { Logger } from "../types/core.js"; /** * Configure the global logger instance used by utility functions and services * * @param logger - Logger instance implementing the Logger interface, or null to disable logging * @returns void * * @example * ```typescript * import { setGlobalLogger } from './utils/globalLogger.js'; * * // Configure logger * setGlobalLogger(myLogger); * * // Disable logging * setGlobalLogger(null); * ``` */ export declare function setGlobalLogger(logger: Logger | null): void; /** * Reset global logger to unconfigured state * Equivalent to setGlobalLogger(null) * * @example * ```typescript * clearGlobalLogger(); // All subsequent logging calls become no-ops * ``` */ export declare function clearGlobalLogger(): void; /** * Check if global logger is currently configured * * @returns true if logger configured, false otherwise * * @example * ```typescript * if (isLoggerConfigured()) { * // Perform expensive logging operation * const debugInfo = generateDebugInfo(); * logger.debug(debugInfo); * } * ``` */ export declare function isLoggerConfigured(): boolean; /** * Zero-overhead logging interface * * Performance characteristics: * - Unconfigured: Single null check + early return (near-zero cost) * - Configured: Null check + function delegation * - No object creation or intermediate allocations */ export declare const logger: { /** * Log debug-level message through global logger * No-op when global logger is null (zero overhead) */ readonly debug: (...args: unknown[]) => void; /** * Log info-level message through global logger * No-op when global logger is null (zero overhead) */ readonly info: (...args: unknown[]) => void; /** * Log warning-level message through global logger * No-op when global logger is null (zero overhead) */ readonly warn: (...args: unknown[]) => void; /** * Log error-level message through global logger * No-op when global logger is null (zero overhead) */ readonly error: (...args: unknown[]) => void; };