Log Format
UMCP emits all logs as JSON lines tostderr. Each log entry has the following structure:
Log Fields
| Field | Type | Description |
|---|---|---|
ts | string | ISO 8601 timestamp |
level | string | Log level: debug, info, warn, error |
event | string | Event type (see below) |
msg | string | Human-readable message |
context | object | Additional structured data (optional) |
Log Levels
UMCP supports four log levels:- debug (10): Detailed diagnostic information
- info (20): General informational messages (default)
- warn (30): Warning messages for non-critical issues
- error (40): Error messages for failures
info, debug messages are suppressed.
Setting Log Level
You can control the log level using theUMCP_LOG_LEVEL environment variable:
debug, info, warn, error
Default: info
Setting the log level to
debug will show detailed diagnostic information, including internal state changes and detailed provider communication.Log Events
UMCP emits the following event types:Configuration Events
config.created
config.created
Emitted when UMCP auto-creates the default config file on first run.Level: Example:
infoContext:config.loaded
config.loaded
Emitted when configuration is successfully loaded and validated.Level: Example:
infoContext:config.invalid
config.invalid
Emitted when configuration validation fails.Level: Example:
errorContext:Provider Events
provider.connected
provider.connected
Emitted when UMCP successfully connects to an upstream provider.Level: Example:
infoContext:provider.disconnected
provider.disconnected
Emitted when UMCP disconnects from an upstream provider. This can happen for:Examples:Ephemeral client:Persistent client:
- Ephemeral clients (created per-request for round-robin env rotation)
- Persistent clients (on shutdown)
infoContext:Tool Events
tool.discovered
tool.discovered
Emitted when UMCP discovers tools from an upstream provider.Level: Example:
infoContext:tool.registered
tool.registered
Emitted when UMCP registers a unified tool with the MCP server.Level: Example:
infoContext:tool.called
tool.called
Emitted when a tool is invoked and forwarded to the upstream provider.Level: Example:
infoContext:tool.schema_fallback
tool.schema_fallback
Emitted when UMCP cannot convert a tool’s JSON Schema to Zod and uses a permissive schema.Level: Example:
warnContext:Environment Events
env.rotated
env.rotated
Emitted when an environment variable is rotated using round-robin for a provider.Level: Example:
infoContext:Server Events
server.started
server.started
Emitted when the UMCP server starts successfully.Level: Context (http):Examples:Stdio transport:HTTP transport:
infoContext (stdio):server.http_error
server.http_error
Emitted when an HTTP request fails.Level: Example:
errorContext:shutdown.signal
shutdown.signal
Emitted when a shutdown signal (SIGINT, SIGTERM) is received.Level: Example:
infoContext:Dry-Run Events
dry_run.complete
dry_run.complete
Emitted when dry-run mode completes successfully.Level: Example:
infoContext:CLI Events
cli.failed
cli.failed
Emitted when a CLI command fails.Level: Example:
errorContext:Debugging Tips
Capture Logs to File
Since logs are written tostderr, you can capture them separately:
Filter by Event Type
Usejq to filter specific events:
Pretty-Print Logs
Usejq for human-readable output:
Monitor Logs in Real-Time
Tail and pretty-print logs:Extract Context Information
Get specific context fields:Secret Masking
When logging environment variable values (like inenv.rotated), UMCP masks secrets:
- If the value is ≤ 4 characters:
*** - If the value is > 4 characters:
XX***YY(first 2 and last 2 chars shown)