Correction (see PR #12 discussion): the "Ask" below originally said to replace print() calls with context["log"], based on the core CLAUDE.md's "Backend plugin logging" guidance. That doesn't reflect this plugin's actual convention. Verified directly against got-feedback/feedback-plugin-editor (the org this repo derives from): routes.py there — and here — logs via logging.getLogger("slopsmith.plugin.editor") at every call site; there is no context["log"]-bound logger anywhere in this plugin, upstream or in this fork. context["log"] is aspirational core-wide guidance that this plugin never actually adopted — don't introduce it here now.
Problem
This repo's own CLAUDE.md states under Conventions: "All backend output via context["log"], never print()." However, routes.py currently has 30 bare print() calls (confirmed via grep -c "print(" routes.py), including at least lines 1526, 4759, 4880, and 4955.
Bare print() bypasses:
- Correlation IDs that a proper logger attaches automatically
- The app-wide log level configuration (a
print() always emits regardless of configured level)
- JSON-mode log formatting, if the deployment has structured logging enabled
Ask
Audit routes.py for all bare print() calls and replace them with logging.getLogger("slopsmith.plugin.editor").info(...) / .warning(...) / .exception(...) — the pattern already used at every other logging site in this file, and in got-feedback's upstream routes.py — not context["log"]. PR #12 already converts the replace-audio handler's print() to this pattern as a reference example; the rest of this file's print() call sites still need the same treatment.
Migrated from Maestro-Ltd/slopsmith-plugin-editor#20.
Correction (see PR #12 discussion): the "Ask" below originally said to replace
print()calls withcontext["log"], based on the core CLAUDE.md's "Backend plugin logging" guidance. That doesn't reflect this plugin's actual convention. Verified directly againstgot-feedback/feedback-plugin-editor(the org this repo derives from):routes.pythere — and here — logs vialogging.getLogger("slopsmith.plugin.editor")at every call site; there is nocontext["log"]-bound logger anywhere in this plugin, upstream or in this fork.context["log"]is aspirational core-wide guidance that this plugin never actually adopted — don't introduce it here now.Problem
This repo's own CLAUDE.md states under Conventions: "All backend output via
context["log"], neverprint()." However,routes.pycurrently has 30 bareprint()calls (confirmed viagrep -c "print(" routes.py), including at least lines 1526, 4759, 4880, and 4955.Bare
print()bypasses:print()always emits regardless of configured level)Ask
Audit
routes.pyfor all bareprint()calls and replace them withlogging.getLogger("slopsmith.plugin.editor").info(...)/.warning(...)/.exception(...)— the pattern already used at every other logging site in this file, and in got-feedback's upstreamroutes.py— notcontext["log"]. PR #12 already converts thereplace-audiohandler'sprint()to this pattern as a reference example; the rest of this file'sprint()call sites still need the same treatment.Migrated from Maestro-Ltd/slopsmith-plugin-editor#20.