6 "github.com/Sirupsen/logrus"
9 // Enable sets the DEBUG env var to true
10 // and makes the logger to log at debug level.
12 os.Setenv("DEBUG", "1")
13 logrus.SetLevel(logrus.DebugLevel)
16 // Disable sets the DEBUG env var to false
17 // and makes the logger to log at info level.
19 os.Setenv("DEBUG", "")
20 logrus.SetLevel(logrus.InfoLevel)
23 // IsEnabled checks whether the debug flag is set or not.
24 func IsEnabled() bool {
25 return os.Getenv("DEBUG") != ""