Recently while tinkering with Go, there was a need to write json logs to disk for ingestion to a SIEM tool. So after researching a little bit around that use case I found two really cool libraries
- Zap – Written by folks at Uber. Read more at https://github.com/uber-go/zap
- Lumberjack – It enables log rotation.
Building on top of these two libraries, I created a wrapper library called go-logger.
- Go Documentation for the package @ https://pkg.go.dev/github.com/fuzzmymind/go-logger
- GitHub @ https://github.com/fuzzmymind/go-logger
Feel free to use and contribute!