UNPKG

@toolprint/hypertool-mcp

Version:

HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers

59 lines • 2.01 kB
/** * MCP Logger wrapper that implements the LoggerInterface * Wraps the existing mcp-logger implementation for feature flag compatibility */ import { Logger as McpLogger } from "@toolprint/mcp-logger"; import { RuntimeOptions } from "../../types/runtime.js"; import { LoggerInterface, LoggingConfig, LogContext } from "./interfaces.js"; export declare const DEFAULT_MCP_LOGGING_CONFIG: LoggingConfig; /** * Wrapper class that adapts mcp-logger to the LoggerInterface */ export declare class McpLoggerWrapper implements LoggerInterface { private mcpLogger; private config; private runtimeOptions?; constructor(config?: Partial<LoggingConfig>, runtimeOptions?: RuntimeOptions); /** * Initialize with async logger for full functionality */ private initializeAsync; /** * Convert LoggingConfig to mcp-logger LoggerOptions with transport-aware mode */ private configToLoggerOptions; /** * Get the log file path for a given server name */ private getLogFilePath; /** * Format context for log messages with Error handling */ private formatContext; fatal(message: string, context?: LogContext): void; error(message: string, context?: LogContext): void; warn(message: string, context?: LogContext): void; info(message: string, context?: LogContext): void; debug(message: string, context?: LogContext): void; trace(message: string, context?: LogContext): void; /** * Create child logger using native mcp-logger functionality */ child(bindings: { module?: string; [key: string]: unknown; }): LoggerInterface; /** * Update configuration and reinitialize */ updateConfig(config: Partial<LoggingConfig>): void; /** * Legacy compatibility - access to underlying mcp logger as pino */ get pino(): McpLogger; /** * Access to underlying mcp logger */ get mcp(): McpLogger; } //# sourceMappingURL=mcpLoggerWrapper.d.ts.map