Handle never read the record's attributes, and WithAttrs and WithGroup returned the receiver unchanged. The JSON and webhook handlers also marshaled slog.Record itself, whose attributes are unexported. Each handler now carries a handlerAttrs value, copied rather than mutated, so sibling loggers cannot leak attributes into each other. JSON and webhook output nest groups as objects; the console appends key=value pairs with dotted group keys, quoted as slog.NewTextHandler quotes them, invalid UTF-8 included. Logged values are never written to. In JSON the record's own fields win a key collision, and a repeated key keeps its last value unless both are groups, which merge; the README documents both. Deviation: DEL is quoted on the console; the stdlib leaves it bare. Model: opus-5-5
65 lines
2.8 KiB
Markdown
65 lines
2.8 KiB
Markdown
# Workflow
|
|
|
|
* branch (from `main`)
|
|
* do the work in Next Step
|
|
* move Next Step to the top of Completed Steps
|
|
* move the top item of Future Steps into Next Step
|
|
* commit (`TODO.md` changes in the same commit as the work)
|
|
* merge to `main` if the branch is not protected, otherwise open a PR
|
|
* push
|
|
|
|
# Status
|
|
|
|
1.0+
|
|
|
|
Tagged v1.0.0 (2024-06-14) and 1.0.1 (2026-02-08). In post-1.0
|
|
maintenance; the library is referenced by the Go styleguide.
|
|
|
|
# Next Step
|
|
|
|
Bring the Makefile up to policy in one commit: add fmt-check, check, and
|
|
hooks targets (test/lint/fmt/docker exist) and add the missing policy
|
|
files it depends on: .golangci.yml, REPO_POLICIES.md, .editorconfig,
|
|
.dockerignore, and .gitea/workflows/check.yml running make check.
|
|
|
|
# Completed Steps
|
|
|
|
* 2026-08-10: fixed every handler discarding slog attributes: console,
|
|
JSON and webhook handlers now emit record attributes, accumulate
|
|
WithAttrs without mutating the receiver, and honour WithGroup;
|
|
slog.Group values nest and LogValuer values are resolved; console
|
|
keys and values holding invalid UTF-8 are quoted
|
|
* 2026-08-07: added canonical `.golangci.yml` (v2 schema), pinned the
|
|
`Dockerfile` lint stage to golangci-lint v2.12.2 (tag+digest), and
|
|
fixed all findings the v1→v2 jump surfaced without changing any
|
|
exported signatures or behavior
|
|
* 2026-02-08: fixed JSONHandler deadlock from recursive log.Println,
|
|
with regression test; tagged 1.0.1
|
|
* 2024-06-14: 1.0 prep: lint and fmt enforced in Docker build, call
|
|
stack depth fix so log locations report correctly, example script,
|
|
removed non-building RELP code; tagged v1.0.0
|
|
* 2024-05-22: module path moved to sneak.berlin/go/simplelog
|
|
* 2024-05-14: initial library: slog-based console, JSON, webhook, and
|
|
RELP handlers, MultiplexHandler, caller file/line info, UTC ISO
|
|
timestamps, level-colored output
|
|
|
|
# Future Steps
|
|
|
|
* Rewrite the Dockerfile to run make check with sha256-pinned base
|
|
images (currently golangci/golangci-lint:latest and golang:1.22,
|
|
unpinned, duplicating Makefile logic instead of calling it)
|
|
* Restructure README.md into the standard sections: Description,
|
|
Getting Started, Rationale, Design, TODO, License, Author
|
|
* Delete the old plain TODO file once this TODO.md lands
|
|
* Add .aider.* to .gitignore and remove the stray aider artifacts from
|
|
the working tree
|
|
* Pick one tag scheme before the next release (v1.0.0 vs 1.0.1 are
|
|
inconsistent)
|
|
* Tag v1.0.2, with the leading v, once the attribute fix lands, so
|
|
consuming repos can move off pseudo-version pins in one step
|
|
* Fix RELP output to cache (from old TODO)
|
|
* Re-add RELP delivery over TCP to remote rsyslog imrelp; removed
|
|
2024-06-14 because it did not build (README planned feature)
|
|
* Add regex filtering for webhook logs (from old TODO)
|
|
* Better console output format (from old TODO)
|