import { type FetchMiddleware } from "./fetch-app.js"; /** Verbosity of the request logger. */ export type LogLevel = "info" | "debug" | "trace"; /** Options for {@link requestLogger} — the shape of `config.logging`. */ export interface LoggingOptions { /** * Whether request logging is on. * * @defaultValue `true` */ enabled?: boolean; /** * Verbosity: `info` (compact lines without payloads, default), `debug` * (adds compact truncated input/output on the detail line), or `trace` * (debug plus full request/response header and body dumps, excluding SSE * response bodies). The `MCP_USE_LOG_LEVEL` environment variable overrides this when set. */ level?: LogLevel; } /** Options for the standalone {@link requestLogger} middleware. */ export interface RequestLoggerOptions extends LoggingOptions { /** * MCP endpoint path. Only requests to this exact path are labelled with * their JSON-RPC method instead of their HTTP method. */ mcpPath?: string; /** Source label used when colocated development services share stdout. */ prefix?: string | undefined; } /** * Fetch middleware logging every request in the compact single-line format (see * the module docs). `MCPServer` registers it automatically unless * `config.logging.enabled` is `false`. SSE responses are logged when the * response becomes available without reading their bodies or waiting for * stream completion. */ export declare function requestLogger(options?: RequestLoggerOptions): FetchMiddleware;