diff --git a/docs/gateway/logging.md b/docs/gateway/logging.md index 4b9b46b4c23..42867eb454d 100644 --- a/docs/gateway/logging.md +++ b/docs/gateway/logging.md @@ -15,6 +15,10 @@ OpenClaw has two log “surfaces”: - **Console output** (what you see in the terminal / Debug UI). - **File logs** (JSON lines) written by the gateway logger. +Supervised installs add a third surface: + +- **Service stdout/stderr logs** written by the launcher itself (for example launchd or systemd). + ## File-based logger - Default rolling log file is under `/tmp/openclaw/` (one file per day): `openclaw-YYYY-MM-DD.log` @@ -39,6 +43,17 @@ openclaw logs --follow raise the file log level. - To capture verbose-only details in file logs, set `logging.level` to `debug` or `trace`. +- `openclaw logs --follow` tails this rolling file logger, not service stdout/stderr logs. + +## Service stdout/stderr logs + +When the gateway runs under a service manager, startup failures and uncaught stderr can also land in supervisor-managed logs: + +- macOS CLI LaunchAgent: `$OPENCLAW_STATE_DIR/logs/gateway.log` and `$OPENCLAW_STATE_DIR/logs/gateway.err.log` +- macOS app bundle launcher: `/tmp/openclaw/openclaw-gateway.log` +- Linux systemd user service: `journalctl --user -u openclaw-gateway.service -n 200 --no-pager` + +These logs are separate from the rolling `/tmp/openclaw/openclaw-YYYY-MM-DD.log` file logger. If disk usage grows on macOS, inspect both surfaces. ## Console capture diff --git a/docs/help/faq.md b/docs/help/faq.md index 2ae55caf0c3..ccf5b7c74aa 100644 --- a/docs/help/faq.md +++ b/docs/help/faq.md @@ -2594,6 +2594,15 @@ Service/supervisor logs (when the gateway runs via launchd/systemd): - macOS: `$OPENCLAW_STATE_DIR/logs/gateway.log` and `gateway.err.log` (default: `~/.openclaw/logs/...`; profiles use `~/.openclaw-/logs/...`) - Linux: `journalctl --user -u openclaw-gateway[-].service -n 200 --no-pager` - Windows: `schtasks /Query /TN "OpenClaw Gateway ()" /V /FO LIST` +- macOS app-bundled launcher stdout/err: `/tmp/openclaw/openclaw-gateway.log` + +If the macOS service logs have grown unexpectedly and you already fixed the underlying error, rotate/truncate them manually: + +```bash +mkdir -p "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/logs" +: > "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/logs/gateway.log" +: > "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/logs/gateway.err.log" +``` See [Troubleshooting](/gateway/troubleshooting#log-locations) for more.