Logging
Scope
This page is an operator view of Moltbot logging: where logs go, how to tail them, and what knobs matter when debugging.
For a user-facing overview (CLI + Control UI), see /en/docs/logging/.
Two log surfaces
- Console output: what you see in the terminal (TTY-aware, formatted).
- File logs: JSONL records written by the gateway logger (best for support/forensics).
File logs (default)
By default, the gateway writes one rolling log file per day under /tmp/moltbot/:
moltbot-YYYY-MM-DD.log
Config keys (in ~/.moltbot/moltbot.json):
logging.filelogging.level
Tail logs:
moltbot logs --follow--verbose vs logging.level
--verboseincreases console verbosity (and WS protocol logging style).- File log detail is controlled by
logging.level(set todebug/traceif you need deep details in files).
Console capture (CLI)
The CLI can capture console.* from the running process and mirror it into file logs while still printing to stdout/stderr.
Common knobs:
logging.consoleLevel(console-only verbosity)logging.consoleStyle(pretty|compact|json)
Redaction (tool summaries)
Verbose tool summaries can redact sensitive strings before they hit the terminal stream:
logging.redactSensitive(off|tools)logging.redactPatterns(custom regex list)
This is a console UX feature; it does not rewrite historical file logs.
Gateway WebSocket protocol logs
The gateway prints WS protocol logs in two practical modes:
- normal: show errors / slow calls / parse failures
- verbose: show all request/response traffic
Examples:
moltbot gateway # optimized output
moltbot gateway --verbose # show all WS traffic
moltbot gateway --verbose --ws-log compact
moltbot gateway --verbose --ws-log fullWhat to collect for a bug report
moltbot status --json(ormoltbot gateway status --json)- last ~200 lines from
moltbot logsaround the failure - exact command you ran (including
--dev/--profile)
Further reading
- Source path:
gateway/logging.md