@@ -366,11 +366,23 @@ DEBUG_COLORS=0 DEBUG=* ./awmg --config config.toml
366366- ` MCP_GATEWAY_PAYLOAD_DIR ` - Large payload storage directory (sets default for ` --payload-dir ` flag, default: ` /tmp/jq-payloads ` )
367367
368368** File Logging:**
369- - Operational logs are always written to ` mcp-gateway. log` in the configured log directory
369+ - Operational logs are always written to log files in the configured log directory
370370- Default log directory: ` /tmp/gh-aw/mcp-logs ` (configurable via ` --log-dir ` flag or ` MCP_GATEWAY_LOG_DIR ` env var)
371371- Falls back to stdout if log directory cannot be created
372+ - ** Log Files Created:**
373+ - ` mcp-gateway.log ` - Unified log with all messages
374+ - ` {serverID}.log ` - Per-server logs (e.g., ` github.log ` , ` slack.log ` ) for easier troubleshooting
375+ - ` gateway.md ` - Markdown-formatted logs for GitHub workflow previews
376+ - ` rpc-messages.jsonl ` - Machine-readable JSONL format for RPC message analysis
372377- Logs include: startup, client interactions, backend operations, auth events, errors
373378
379+ ** Per-ServerID Logging:**
380+ - Each backend MCP server gets its own log file for easier troubleshooting
381+ - Use ` LogInfoWithServer ` , ` LogWarnWithServer ` , ` LogErrorWithServer ` , ` LogDebugWithServer ` functions
382+ - Example: ` logger.LogInfoWithServer("github", "backend", "Server started successfully") `
383+ - Logs are written to both the server-specific file and the unified ` mcp-gateway.log `
384+ - Thread-safe concurrent logging with automatic fallback
385+
374386** Large Payload Handling:**
375387- Large tool response payloads are stored in the configured payload directory
376388- Default payload directory: ` /tmp/jq-payloads ` (configurable via ` --payload-dir ` flag, ` MCP_GATEWAY_PAYLOAD_DIR ` env var, or ` payload_dir ` in config)
0 commit comments