Preserve bound slog attributes in persistent log sinks #1565

Closed
opened 2026-10-27 13:40:54 +00:00 by sam · 0 comments
Owner

PR #650 scopes daemon, Web UI, and curator loggers with slog.Logger.With. internal/logging.FeedHandler.WithAttrs retains those bound attributes for the live feed but does not pass them to the wrapped handler, while Handle forwards the bare slog.Record. As a result, component is present in live Web UI entries but absent from stderr and file JSON; after restart, historical component discovery and filtering cannot see those records. Fix bound-attribute propagation without breaking slog group semantics or duplicating attributes.

Acceptance criteria

Bound attributes appear in both Feed entries and the wrapped JSON sink; component values survive file persistence and are discoverable and filterable through historical /api/logs reads; regression tests exercise logger.With for both live and persistent paths; task check passes.

Close reason

Fixed: FeedHandler.WithAttrs/WithGroup now propagate to the wrapped handler, matching SystemLogHandler's existing pattern. Added regression test covering both feed and persistent sink.


Imported from beads archie-core-s81k · GitHub #655 · type bug · priority P1 · created 2026-09-02 · closed 2026-09-02

PR #650 scopes daemon, Web UI, and curator loggers with slog.Logger.With. internal/logging.FeedHandler.WithAttrs retains those bound attributes for the live feed but does not pass them to the wrapped handler, while Handle forwards the bare slog.Record. As a result, component is present in live Web UI entries but absent from stderr and file JSON; after restart, historical component discovery and filtering cannot see those records. Fix bound-attribute propagation without breaking slog group semantics or duplicating attributes. ### Acceptance criteria Bound attributes appear in both Feed entries and the wrapped JSON sink; component values survive file persistence and are discoverable and filterable through historical /api/logs reads; regression tests exercise logger.With for both live and persistent paths; task check passes. ### Close reason Fixed: FeedHandler.WithAttrs/WithGroup now propagate to the wrapped handler, matching SystemLogHandler's existing pattern. Added regression test covering both feed and persistent sink. --- _Imported from beads `archie-core-s81k` · GitHub #655 · type bug · priority P1 · created 2026-09-02 · closed 2026-09-02_
sam added the highbug labels 2026-10-27 13:40:54 +00:00
sam self-assigned this 2026-10-27 13:40:54 +00:00
sam closed this issue 2026-10-27 13:40:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1565