Skip to content

Add OpenClaw runtime log sweep helper#15

Open
sene1337 wants to merge 3 commits into
cathrynlavery:mainfrom
sene1337:feat/log-sweep-runtime-logs
Open

Add OpenClaw runtime log sweep helper#15
sene1337 wants to merge 3 commits into
cathrynlavery:mainfrom
sene1337:feat/log-sweep-runtime-logs

Conversation

@sene1337

Copy link
Copy Markdown
Contributor

Summary

  • add scripts/log-sweep.sh to sweep gateway logs plus /tmp/openclaw/openclaw-*.log and /private/tmp/openclaw/openclaw-*.log
  • document it as the first step when a user says “check the logs” or quotes a visible error
  • include a default broad pattern for common OpenClaw runtime/plugin failures

Why

Gateway-focused checks can miss plugin/runtime errors that are written to tmp OpenClaw logs. In a live incident, LCM errors such as ALL PROVIDERS EXHAUSTED, runtime.llm.complete is unavailable, and afterTurn: ingest failed, skipping compaction were present in /tmp/openclaw/openclaw-2026-05-16.log while a gateway.err-only check missed the active failure.

Verification

  • bash -n scripts/log-sweep.sh
  • bash tests/run.sh
  • verified locally against active logs:
    • log-sweep.sh --literal 'ALL PROVIDERS EXHAUSTED'
    • log-sweep.sh --literal 'afterTurn: ingest failed, skipping compaction'
    • log-sweep.sh --literal 'runtime.llm.complete is unavailable'

All three live-error checks found matches in /tmp/openclaw/openclaw-2026-05-16.log.

@cathrynlavery

cathrynlavery commented May 20, 2026

Copy link
Copy Markdown
Owner

The helper itself looks solid, but I’d fix one docs issue before merging.

Request changes

  • SKILL.md documents a hard-coded personal path:
    • bash /Users/senemaro/.openclaw/workspace/skills/openclaw-ops/scripts/log-sweep.sh
  • That should use the canonical Knox checkout path or be repo-relative, e.g.:
    • bash /Users/knox/Developer/openclaw-ops/scripts/log-sweep.sh
    • or bash scripts/log-sweep.sh from the repo root

Verification:

  • git diff --check origin/main...HEAD passed
  • bash -n scripts/log-sweep.sh passed
  • shellcheck scripts/log-sweep.sh passed
  • bash tests/run.sh passed
  • Smoke-tested both --literal mode and default regex mode against temp log fixtures

Non-blocking suggestion: add direct tests for scripts/log-sweep.sh covering literal mode, default regex mode, missing logs, /tmp/openclaw vs /private/tmp/openclaw dedupe, and match-limit output.

@cathrynlavery

cathrynlavery commented May 20, 2026

Copy link
Copy Markdown
Owner

Addressed the earlier review blocker on this PR.

Verification:

  • git diff --check
  • bash -n scripts/*.sh tests/run.sh
  • bash tests/run.sh

Please re-review when available.

@cathrynlavery

Copy link
Copy Markdown
Owner

Thanks — this helper looks useful and I do not see spam/backlink concerns. The script is read-only, scoped, and helpful for finding OpenClaw runtime/plugin errors across gateway/watchdog/temp logs.

One blocker before merge: SKILL.md currently includes a contributor-local path:

bash /Users/senemaro/.openclaw/workspace/skills/openclaw-ops/scripts/log-sweep.sh

Please replace that with a repo-safe path/example consistent with the rest of this repo, ideally a relative path from the checked-out repo, e.g.:

bash scripts/log-sweep.sh --literal "error text"

or the canonical operator install path if this doc intentionally uses absolute examples.

After that cleanup, this is likely good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants