Commit graph

5 commits

Author SHA1 Message Date
Virgil
426b164b75 fix: replace stdlib helpers with core 2026-03-23 07:38:22 +00:00
Snider
c8178fcd7e fix(dx): update CLAUDE.md and raise test coverage to 97.7%
- CLAUDE.md: add missing exported symbols (NewError, Message, AllOps,
  FormatStackTrace, Security, Username) to architecture description
- Add tests for SetOutput, SetRedactKeys, odd keyval handling,
  op/stack deduplication, RotationWriterFactory, default output,
  Username, and all package-level proxy functions
- Add ErrCode tests for plain error and nil inputs
- Coverage: 86.1% → 97.7%

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 07:18:38 +00:00
Snider
1faaae8c90 fix(conventions): alias stdlib io as goio and fix test naming
- Alias stdlib `io` as `goio` in log.go to avoid collision with core/go-io
- Rename TestStackTrace_Mixed to TestStackTrace_Mixed_Good (convention)
- Remove dead code from test (abandoned errors.New approach)
- NewError correctly uses errors.New — it is an intentional stdlib wrapper

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 17:43:15 +00:00
Snider
700747aa0b security: add key redaction and log injection prevention
Add SetRedactKeys() for masking sensitive values in log output.
Quote string values with %q to prevent log injection attacks.
Add AllOps iterator and improve error stack formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 08:29:57 +00:00
Snider
54a36a779b feat: standalone structured logging and error handling
Zero-dependency logging + error types extracted from core/go.
- E(), Wrap(), WrapCode() structured errors with Op/Msg/Code
- Structured logger with levels, security logging, key-value pairs
- RotationWriterFactory hook for io.Medium integration
- StackTrace(), Root(), FormatStackTrace() error introspection

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 09:30:57 +00:00