diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-12-12 12:12:28 +0100 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2017-12-12 12:12:28 +0100 |
commit | 63e37a1f02638525e6261a1aaecb51df3504639c (patch) | |
tree | d950043684412966eb0d44f08b400cdd245e90f2 /main.go | |
parent | 8f2364c22218754ae61cbf1ff9a5897573b43d62 (diff) |
Adapt early logging level of HTTP client.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -320,6 +320,11 @@ func XdsConnInit(ctx *cli.Context) error { serverURL = "http://" + serverURL } + lvl := common.HTTPLogLevelWarning + if Log.Level == logrus.DebugLevel { + lvl = common.HTTPLogLevelDebug + } + // Create HTTP client Log.Debugln("Connect HTTP client on ", agentURL) conf := common.HTTPClientConfig{ @@ -328,7 +333,7 @@ func XdsConnInit(ctx *cli.Context) error { CsrfDisable: true, LogOut: Log.Out, LogPrefix: "XDSAGENT: ", - LogLevel: common.HTTPLogLevelDebug, + LogLevel: lvl, } HTTPCli, err = common.HTTPNewClient(agentURL, conf) |