Back to Knowledge Base
Troubleshoot

Where do I find OpenClaw logs?

Logs are written to rolling files in /tmp/openclaw/ by default. You can tail them via CLI or view in the Control UI.

OpenClaw stores logs in two places: rolling log files on disk and console output shown in terminals and the Control UI. The Gateway writes JSONL-formatted logs, which you can read directly or through the CLI for formatted output.

Default log location

The Gateway creates a new log file each day under:

/tmp/openclaw/openclaw-YYYY-MM-DD.log

The date uses the gateway host's local timezone. Files are named with the current date and rotated automatically.

How to read logs

CLI: live tail (recommended)

Use the CLI to tail the gateway log file in real-time:

openclaw logs --follow

Output modes:

  • TTY sessions: pretty, colorized, structured log lines
  • Non-TTY sessions: plain text
  • --json: line-delimited JSON (one log event per line)
  • --plain: force plain text in TTY sessions
  • --no-color: disable ANSI colors

Control UI (web)

The Control UI's Logs tab tails the same file using the gateway's logs.tail RPC. Open the UI and navigate to the Logs section to view formatted output in your browser.

Channel-specific logs

To filter logs for specific channels (WhatsApp, Telegram, etc.):

openclaw channels logs --channel whatsapp

Configuring log location

Override the default log path in your ~/.openclaw/openclaw.json config file:

{
  "logging": {
    "file": "/path/to/openclaw.log",
    "level": "info"
  }
}

Log levels

OpenClaw has two independent log level controls:

  • logging.level — controls file log verbosity (default: info)
  • logging.consoleLevel — controls console output verbosity (default: info)

Use --verbose flag to temporarily increase console verbosity without changing config. To increase file log detail permanently, set logging.level to debug or trace.

Troubleshooting

If you can't access logs:

  • Run openclaw doctor to check if the Gateway is reachable
  • Verify the Gateway is running: openclaw gateway status
  • Check the file path in ~/.openclaw/openclaw.json under logging.file
  • Ensure you have read permissions for the log directory

Pro Tip: Log Formats

Log files are JSONL (one JSON object per line). The CLI parses these to show readable output. For programmatic access, use --json to get raw structured data perfect for log processors and ELK stacks.