Write the backend's logs as the estate's log line (AHT-204) #27
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
javascript
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/crenellation!27
Loading…
Reference in a new issue
No description provided.
Delete branch "aht-204-logline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: AHT-204, one logging standard across at-home.
The backend's logs become the estate's one log line, the same way auth and chess-tactics moved.
backend/log.js(new):@romaine-life/logline0.1.4, pinned exactly, writing to stdout through its stream logger. It also providesoutsideanderrorText, which mask credentials withredactand cap the text at 4 KiB.server.js,supervisor.jsandself-check.jsbecomes a level, a fixed message and fields. Error stacks and upstream error text go througherrorText. No token, code, cookie or Authorization value is logged.supervisor.jssetsBAKED_BACKEND_DIRso that the hot copy ofserver.jsloads the bakedlog.js, which is chess-tactics' arrangement.backend/.npmrcpoints to Forgejo's npm registry. The Dockerfile copies it and mounts theFORGEJO_PACKAGES_TOKENBuildKit secret onnpm install.backend/log.test.js(new) reads the lines back with logline'sparse. It covers absent fields, masking, the cap, stacks kept on one line, and a real server start with no database, where every stdout line must parse and stderr must be empty. The self-check now loadslog.js, which shows the image's Node canrequire()the ES module.Not changed: there is still no per-request line. The backend never had request logging (no morgan, no Hono logger), and chess-tactics, which this backend comes from, kept none either.
🤖 Generated with Claude Code