/go-dlog

:pager: conditional logging for Golang libraries & applications

Primary LanguageGoMIT LicenseMIT

go-dlog Doc

📟 conditional logging for Golang libraries & applications

screenshot

installation

go get gopkg.in/ddo/go-dlog.v2

usage

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

env

set DLOG environment(case-insensitive) to

  • DEBUG or * to enable #Debug and above
  • INFO to enable #Info, #Done, #Fail and above
  • WARN to enable #Warn and above
  • ERROR to enable #Error