pkg/logger: document INFO field-hiding as design contract, not limitation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
djmil 2026-06-03 20:04:52 +00:00
parent 2ed3eaac9e
commit f6c8a48150

View File

@ -47,6 +47,10 @@ type writeState struct {
// INFO: message: k=v, … full fields — debug mode dumps everything
// WARN: warning: msg: k=v, …
// ERROR: error: msg: k=v, …
//
// INFO fields are intentionally hidden in normal mode: they are context for a
// debug session, not alerts for the operator. Put fields on WARN or ERROR when
// the reader needs them immediately to understand a problem.
type humanHandler struct {
w io.Writer
level slog.Level