[
    {
        "role": "user",
        "content": "where%20does%20openclaw%20store%20its%20command%20logs%3F"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s where OpenClaw stores its command / gateway logs by default, plus how you can change that behavior:\n\n---\n\n## Default Log Locations\n\n- By default, structured file logs are written under  \n  ```\n  /tmp/openclaw/openclaw-YYYY-MM-DD.log\n  ```  \n  where the date is based on the gateway host\u2019s local timezone. ([learnclawdbot.org](https://www.learnclawdbot.org/docs/logging?utm_source=openai))\n\n- If you\u2019re on macOS and using the \u201cservice/supervisor\u201d setup, there are also traditional log files:  \n  ```\n  ~/.openclaw/logs/gateway.log  \n  ~/.openclaw/logs/gateway.err.log\n  ```  \n  (If you're using a named \u201cprofile,\u201d its logs may be under `~/.openclaw-<profile>/logs/...`) ([docs.openclaw.ai](https://docs.openclaw.ai/help/faq?utm_source=openai))\n\n---\n\n## Viewing the Logs\n\n- You can view or stream logs via the CLI:  \n  ```\n  openclaw logs --follow\n  ```  \n  This tails the gateway log file. ([learnclawdbot.org](https://www.learnclawdbot.org/docs/logging?utm_source=openai))\n\n- The Control UI also shows recent logs through its \u201cLogs\u201d tab, which pulls from the same file tail as the CLI does. ([learnclawdbot.org](https://www.learnclawdbot.org/docs/logging?utm_source=openai))\n\n---\n\n## Customizing Log Location & Format\n\n- To override where the file logs are saved, edit your config in `~/.openclaw/openclaw.json` with something like:  \n  ```json\n  {\n    \"logging\": {\n      \"file\": \"/path/to/openclaw.log\"\n    }\n  }\n  ```  \n  ([learnclawdbot.org](https://www.learnclawdbot.org/docs/logging?utm_source=openai))\n\n- **Important caveat:** There is a known bug (as of v2026.4.1) where setting `logging.file` sometimes doesn\u2019t work, especially on **macOS**. The gateway still ends up writing logs to `/tmp/openclaw/openclaw-YYYY-MM-DD.log` because of a boot-order race in the internals. A full restart doesn\u2019t always fix this. ([zooclaw.ai](https://zooclaw.ai/help/en/2026-04-14/fix-logging-file-config-boot-race/?utm_source=openai))\n\n---\n\nIf you tell me your OS (Linux, macOS, Windows) and how OpenClaw is running (manual, daemon/service, etc.), I can help you track down *exactly* where your logs are going."
    }
]