Golang logrus – how to do a centralized configuration?
You don’t need to set these options in each file with Logrus. You can import Logrus as log: import log “github.com/Sirupsen/logrus” Then functions like log.SetOutput() are just functions and modify the global logger and apply to any file that includes this import. You can create a package global log variable: var log = logrus.New() Then … Read more