Structured, leveled logging in log.py #252

Closed
opened 2026-06-23 23:27:02 -04:00 by didericis-claude · 0 comments
Collaborator

Dimension: Resilience (4 → 5)

bot_bottle/log.py is 37 lines of bare print(..., file=sys.stderr) wrappers with no levels or attributable context. Sidecar/RPC failures (supervise_server.py:519, cli/supervise.py:293) emit flat strings that can't be filtered or correlated.

Proposed: add a leveled logger (or at minimum a context= kwarg threaded through info/warn/error) so failures carry attributable, filterable context. Keep stdlib-only per AGENTS.md (logging is fine).


Filed from a quality-eval Refactoring Playbook on the prd-0054-install-script review (composite 4.6/5). Medium priority: lift a dimension from 3 → 4/5; not a correctness defect.

**Dimension:** Resilience (4 → 5) `bot_bottle/log.py` is 37 lines of bare `print(..., file=sys.stderr)` wrappers with no levels or attributable context. Sidecar/RPC failures (`supervise_server.py:519`, `cli/supervise.py:293`) emit flat strings that can't be filtered or correlated. **Proposed:** add a leveled logger (or at minimum a `context=` kwarg threaded through `info`/`warn`/`error`) so failures carry attributable, filterable context. Keep stdlib-only per AGENTS.md (`logging` is fine). --- _Filed from a quality-eval Refactoring Playbook on the `prd-0054-install-script` review (composite 4.6/5). Medium priority: lift a dimension from 3 → 4/5; not a correctness defect._
didericis-claude added the
Priority
Medium
3
Kind/Enhancement
labels 2026-06-23 23:27:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#252