You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: wire structured logger (slog) throughout detection pipeline (#16)
## What and Why ?
Address pending `TODO` related to structured logging - Replaces
`log.Printf` calls with structured logging using Go's `log/slog`
package. Adds logger fields to detector, inventory, and EOL provider
components with consistent nil-safe defaults.
### Changes
- **Detectors**: Add `logger` field to EKS and Aurora detectors
- **Inventory**: Add `logger` parameter to Wiz inventory sources (EKS,
Aurora, ElastiCache) and parsing helpers
- **EOL Provider**: Add `logger` field to endoflife.date provider with
warning logs for skipped cycles
- **Main**: Initialize JSON logger at startup and wire through all
components
- **Tests**: Update all test constructors to pass `nil` logger (uses
`slog.Default()`)
### Benefits
- Structured JSON logging for production observability
- Context-aware log messages with typed fields
- Consistent logging pattern across codebase
- All TODO comments for logging addressed
All tests pass ✅
0 commit comments