/** * STDIO-safe logger. * * MCP servers running over the STDIO transport use stdout/stderr to exchange * protocol messages, so we cannot use the default `console.log`. We accept a * `logger` option on the public API or the legacy logger configured through * `setLogger`; when neither is configured, log calls are silently dropped. * Errors that affect tracking should still be observable in apps that want * them, so the consumer can plug in any function (e.g. `console.error` for * non-STDIO transports, a file logger, etc.). */ export type LoggerFn = (message: string) => void; export declare function setLogger(logger: LoggerFn | undefined): void; /** * Creates a safe logger for one instrumented server. A server-specific logger * remains isolated, while an omitted logger preserves the legacy `setLogger` * fallback. */ export declare function createLogger(logger: LoggerFn | undefined): LoggerFn; /** Logs through the legacy module-level logger configured by {@link setLogger}. */ export declare function log(message: string): void; //# sourceMappingURL=logger.d.ts.map