Skip to main content

Module logger

Module logger 

Source

Functions§

init_logging
Installs the process-global structured logger: JSON output (pretty on an interactive TTY), level from resolve_log_level() — mirrors targets::typescript’s logger.ts. Correlation IDs are carried as a trace_id span field (see correlation_context) rather than pino’s per-record mixin, since tracing spans are the idiomatic Rust equivalent of that pattern. Field-level secret redaction isn’t automatic here; call sanitizer::sanitize before logging any user- or API-controlled JSON payload.
resolve_log_level
GITHUB_MCP_LOG_LEVEL, defaulting to "info" when unset.

Type Aliases§

BoxedLayer
A type-erased tracing_subscriber layer — lets otel::build_layer’s OpenTelemetry bridge layer compose into the same subscriber init_logging installs, without init_logging needing to name otel’s concrete layer type.