📟 conditional logging for Golang libraries & applications
go get gopkg.in/ddo/go-dlog.v2
logger := dlog.New("logger", nil)
logger.Debug("some log")
logger.Info("some log")
logger.Warn("some log")
logger.Error("some log")
DLOG=* go run example.go
set DLOG
environment(case-insensitive) to
DEBUG
or*
to enable#Debug
and aboveINFO
to enable#Info
,#Done
,#Fail
and aboveWARN
to enable#Warn
and aboveERROR
to enable#Error