Move qmgr code to its own file

This commit is contained in:
Arthur Barr
2018-02-20 14:41:35 +00:00
parent ace6e6364c
commit 05d1c6f0de
4 changed files with 143 additions and 119 deletions

View File

@@ -94,6 +94,15 @@ func mirrorLogs(ctx context.Context, wg *sync.WaitGroup, name string, fromStart
})
}
func configureDebugLogger() {
debugEnv, ok := os.LookupEnv("DEBUG")
if ok && (debugEnv == "true" || debugEnv == "1") {
debug = true
logrus.SetLevel(logrus.DebugLevel)
logDebug("Debug mode enabled")
}
}
func configureLogger() {
if jsonLogs() {
formatter := logrus.JSONFormatter{