Repository navigation
fix(logging): give non-default profiles their own gateway log file - #112777
Conversation
|
Live proof (integration merge of the four Wave-1 branches, dev gateway, real crabbox AWS worker, 2026-07-22): with the dev-profile gateway running, |
502169c to
5f6781e
Compare
|
ClawSweeper findings and Rank-up moves reviewed against exact head 5f6781e:
|
|
Correction to my previous ClawSweeper disposition: the executable |
|
Merged via squash.
|
…penclaw#112777) * fix(logging): give non-default profiles their own gateway log file * chore: defer profile log release note
What Problem This Solves
Fixes an issue where operators running the default Gateway alongside a named profile, especially
--dev, would get both processes interleaved in the same daily file log. That made CLI, RPC, and Control UI log forensics ambiguous.Why This Change Was Made
The canonical log-path resolver now derives a filename-safe, collision-resistant segment from
OPENCLAW_PROFILE, while preserving the historical unqualified filename for the default profile. The logger and log-tail fallback share the same resolved target and rolling-mode decision, so explicitlogging.fileoverrides keep their prior semantics and a missing profile log cannot fall back to another profile's family.User Impact
The default profile still writes
openclaw-YYYY-MM-DD.log. Named profiles write their ownopenclaw-<profile>-YYYY-MM-DD.logfamily, includingopenclaw-dev-YYYY-MM-DD.log, andopenclaw --profile <profile> logsplus Control UI Settings > Logs follow that same file.Evidence
node scripts/run-vitest.mjs src/logging/log-file-path.test.ts src/logging/log-tail.test.ts src/logging/log-file-size-cap.test.ts src/logging/logger-settings.test.ts src/logging/logger.browser-import.test.ts— 26 tests passed across 2 routed shards.node scripts/check-changed.mjs -- <18 touched files>— core and core-test TypeScript, changed-file lint, formatting, Plugin SDK API baseline, import-cycle checks, and all selected guards passed..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean; no accepted/actionable findings.