Skip to main content

Module logging

Module logging 

Source

Functions§

default_level
The default filter when neither LEAN_CTX_LOG nor RUST_LOG is set: warn for server-like processes, error for user-facing commands.
init_cli_logging
Initialize the tracing subscriber for a user-facing command. Defaults to error: what a person needs to know is printed as a plain line by the command itself, not as a WARN log record. LEAN_CTX_LOG / RUST_LOG still raise it.
init_logging
Initialize the tracing subscriber for a server-like command (daemon, proxy, serve, …) that is not the stdio MCP server.
init_mcp_logging
Initialize logging for daemon/MCP mode (stderr, defaults to info). Daemon logs go to a file, so verbosity is fine.