X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=main.go;h=2d0c1799fbb41cff765698461dec2eb43a485998;hb=6f71a805b2f6f961761b5906a21d2a234b84aa4c;hp=bf03375e4d8bafdebc593398c2191876e79bee24;hpb=8f2364c22218754ae61cbf1ff9a5897573b43d62;p=src%2Fxds%2Fxds-cli.git diff --git a/main.go b/main.go index bf03375..2d0c179 100644 --- a/main.go +++ b/main.go @@ -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)