Simple logger for Go.
- Pretty
console
handler for terminals - Adds a level filter handler
- json and logfmt handlers
- Adds a multi-logger
go get github.com/livebud/log
log := log.Multi(
log.Filter(log.LevelInfo, log.Console(color.Ignore(), os.Stderr)),
log.Json(os.Stderr),
)
log.Debug("world", "args", 10)
log.Info("hello", "planet", "world", "args", 10)
log.Warn("hello", "planet", "world", "args", 10)
log.Error("hello world", "planet", "world", "args", 10)
- Matt Mueller (@mattmueller)
MIT