Skip to main content

Module logging

Module logging 

Source
Expand description

MCP logging integration via tracing.

Provides a custom tracing subscriber that forwards log events to MCP clients. Maps Rust tracing levels to MCP LoggingLevel.

Structsยง

LogEvent
Lightweight event sent from McpLoggingLayer to consumer task via unbounded channel.
McpLoggingLayer
Custom tracing Layer that bridges tracing events to MCP client via unbounded channel. Sends lightweight LogEvent to channel; consumer task in on_initialized drains with recv_many.