fix(cli): fall back to file logs when local logs rpc closes

This commit is contained in:
Peter Steinberger
2026-04-29 07:45:09 +01:00
parent 6306e2fdcb
commit e25b542100
5 changed files with 61 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ openclaw logs --url ws://127.0.0.1:18789 --token "$OPENCLAW_GATEWAY_TOKEN"
## Notes
- Use `--local-time` to render timestamps in your local timezone.
- If the local loopback Gateway asks for pairing, `openclaw logs` falls back to the configured local log file automatically. Explicit `--url` targets do not use this fallback.
- If the implicit local loopback Gateway asks for pairing, closes during connect, or times out before `logs.tail` answers, `openclaw logs` falls back to the configured Gateway file log automatically. Explicit `--url` targets do not use this fallback.
## Related

View File

@@ -73,9 +73,10 @@ In JSON mode, the CLI emits `type`-tagged objects:
- `notice`: truncation / rotation hints
- `raw`: unparsed log line
If the local loopback Gateway asks for pairing, `openclaw logs` falls back to
the configured local log file automatically. Explicit `--url` targets do not
use this fallback.
If the implicit local loopback Gateway asks for pairing, closes during connect,
or times out before `logs.tail` answers, `openclaw logs` falls back to the
configured Gateway file log automatically. Explicit `--url` targets do not use
this fallback.
If the Gateway is unreachable, the CLI prints a short hint to run: