Documentation
¶
Overview ¶
Package logx is the library's diagnostics sink: a leveled, zero-dependency logger writing to stderr. The default level is Info; the dispatcher picks up --xyz.log-level (code-side: logx.SetLevel).
The library only ever writes diagnostics here — command results and usage errors stay on their own output/error streams and are unaffected by the log level.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Level ¶
type Level int32
Level is a verbosity level. Higher = quieter.
const ( // LevelUnset 排在 0 位:它是 Config.LogLevel 的 Go 零值,语义为「保持默认」。 LevelUnset Level = iota // LevelDebug enables dispatch/negotiation tracing (handy for MCP). LevelDebug // LevelInfo is the default: startup notices, mode chosen. LevelInfo // LevelWarn keeps warnings only (disabled channels, unprotected transports). LevelWarn // LevelError keeps error diagnostics only. LevelError )
func ParseLevel ¶
ParseLevel maps a flag value ("debug"|"info"|"warn"|"error") to a Level.