12 Commits
Author SHA256 Message Date
Claude fe711ed2a5 v0.1.12 SetConsoleWriter routes console output to a host writer
Test / test (push) Canceled after 0s
Test / fuzz (./compat, FuzzParseFormat) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatJSON) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatTextPolicy) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSanitize) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSerializerJSON) (push) Canceled after 0s
A host that draws on the terminal (a TUI) cannot let the logger write to
stdout or stderr, yet the records are worth showing inside the host.
SetErrorHandler already covers internal diagnostics; SetConsoleWriter is
its sibling for console output.

- SetConsoleWriter(w) sends console output of every console_target to w,
  split's warn-and-above records included; nil restores stdout/stderr.
  It holds across ApplyConfig and is safe while logging.
- One stored value: ApplyConfig and SetConsoleWriter publish the console
  writers through storeConsole; the processor's split branch now reads
  the stored warn writer instead of writing os.Stderr directly.
- TestLoggerConsoleTargets becomes TestConsoleWriterTakesEveryTarget,
  which asserts where each target's records land; a second test checks
  that nil restores the configured writers.
- README names both hooks for terminal hosts; the API doc's callback
  contract covers console writers.

Verified: go build ./... ok; gofmt -l on changed files clean; go vet ./...
ok; go test ./... ok (all four packages, under 1 s); go test -race on the
new tests ok; mutation run 6 of 6 caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyaMAhyEzAp3ULLWJZG4jQ
2026-10-10 20:14:00 -04:00
lixen 2eaa80a39d v0.1.8 tests converted to standard library from testify 2026-07-24 13:48:21 -04:00
lixen 3e79df87ae v0.1.6 fix to formatter and sanitizer for async use, doc update 2026-07-17 12:53:28 -04:00
lixen 5587eb9175 v0.1.5 cleanup 2026-02-25 09:40:07 -05:00
lixen 6734e2141c v0.1.4 formatter race fix, fiber adapter added, default config changed, docs updated 2025-11-17 16:33:08 -05:00
lixen 05228e64ba v0.1.1 format refactored, sanitizer added 2025-11-15 04:32:39 -05:00
lixen 443cd85416 v0.1.0 Release 2025-11-11 03:53:43 -05:00
lixen ce6b178855 e3.2.1 Format type text changed to txt for consistency and clarity. 2025-10-10 05:40:26 -04:00
lixen 162541e53f e3.2.0 File and console output clarity and uniform configuration, minor cleanup. 2025-09-29 10:53:47 -04:00
lixen d58b61067f e3.1.2 Changed output stdout to console for clarity. 2025-09-29 04:47:48 -04:00
lixen ce6e3b7ffc e3.1.0 Refactored lifecycle (configuration, drop report, heartbeat). 2025-07-21 21:28:45 -04:00
lixen 98402cce37 e3.0.0 Tests added, optimization, bug fixes, builder changed. 2025-07-20 18:11:03 -04:00