Corrects log level

This commit is contained in:
emile 2015-09-21 10:50:46 +02:00
parent 4ec6b06b8b
commit 32c0ffe87a

View file

@ -69,19 +69,16 @@ func main() {
} else { } else {
logBackend := logging.NewLogBackend(fi, "", 0) logBackend := logging.NewLogBackend(fi, "", 0)
logBackendFormatter := logging.NewBackendFormatter(logBackend, logging.GlogFormatter) logBackendFormatter := logging.NewBackendFormatter(logBackend, logging.GlogFormatter)
logBackendLeveled := logging.AddModuleLevel(logBackend)
logBackendLeveled.SetLevel(level, "")
backends = append(backends, logBackendFormatter) backends = append(backends, logBackendFormatter)
} }
} }
if gloablConfiguration.TraefikLogsStdout { if gloablConfiguration.TraefikLogsStdout {
logBackend := logging.NewLogBackend(os.Stdout, "", 0) logBackend := logging.NewLogBackend(os.Stdout, "", 0)
logBackendFormatter := logging.NewBackendFormatter(logBackend, format) logBackendFormatter := logging.NewBackendFormatter(logBackend, format)
logBackendLeveled := logging.AddModuleLevel(logBackend)
logBackendLeveled.SetLevel(level, "")
backends = append(backends, logBackendFormatter) backends = append(backends, logBackendFormatter)
} }
logging.SetBackend(backends...) logging.SetBackend(backends...)
logging.SetLevel(level, "traefik")
configurationRouter = LoadDefaultConfig(gloablConfiguration) configurationRouter = LoadDefaultConfig(gloablConfiguration)