mirror of
https://github.com/imjasonh/snoop
synced 2026-07-18 14:45:09 +00:00
Add structured logging with clog
Implement context-aware structured logging throughout the codebase using chainguard-dev/clog. This provides better observability with configurable log levels and structured output. - Add -log-level flag to control verbosity (debug, info, warn, error) - Replace all log.Println/Printf calls with structured clog logging - Thread context through NewProbe, NewProcessor, and NewFileReporter - Add detailed debug logging for eBPF tracepoint attachment - Add debug logging for file operations in reporter - Change "new file" messages to debug level to reduce noise - Update all tests to pass context.Background() Default log level is "info" which provides operational visibility without excessive verbosity. Debug level shows detailed event processing. Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
parent
5fc1a6dea1
commit
2dd10e3e1e
9 changed files with 130 additions and 49 deletions
5
plan.md
5
plan.md
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
Milestone 3 progress:
|
||||
- ✅ Prometheus metrics endpoint (`/metrics` on port 9090)
|
||||
- ✅ Structured logging with clog
|
||||
|
||||
**Next**: Structured logging with clog
|
||||
**Next**: Ring buffer overflow handling and metrics
|
||||
|
||||
See [Milestone 3](#milestone-3-production-hardening) for remaining tasks.
|
||||
|
||||
|
|
@ -360,7 +361,7 @@ Volume mounts:
|
|||
|
||||
**Deliverables**:
|
||||
- [x] Prometheus metrics endpoint
|
||||
- [ ] Structured logging with levels (clog)
|
||||
- [x] Structured logging with levels (clog)
|
||||
- [ ] Ring buffer overflow handling and metrics
|
||||
- [ ] Memory-bounded deduplication (LRU or bloom filter for extreme cases)
|
||||
- [ ] Health check endpoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue