Commit 8423f2c
committed
feat: implement structured logging with Logrus (Task #3861)
- Add Logrus v1.9.3 dependency
- Create pkg/logger package with thread-safe initialization
- Add buffering (256KB) to prevent I/O blocking
- Implement Close() and Flush() for proper cleanup
- Update main.go with structured logging throughout
- Add shutdown handler with log flushing
- Fix security issue (file permissions 0644)
- Test coverage: 80.3%
Fixes all blocking issues identified in Principal Engineer review:
- File handle resource leak
- Missing buffer flush on shutdown
- Race condition in concurrent initialization
- Blocking I/O in hot path
Related to Feature #340: Improve codebase quality and maintainability1 parent 6f8bd7d commit 8423f2c
File tree
5 files changed
+745
-56
lines changed- cmd/node-doctor
- pkg/logger
5 files changed
+745
-56
lines changed
0 commit comments