Code Review
/
src
/
xds
/
xds-cli.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8f2364c
)
Adapt early logging level of HTTP client.
author
Sebastien Douheret
<sebastien.douheret@iot.bzh>
Tue, 12 Dec 2017 11:12:28 +0000
(12:12 +0100)
committer
Sebastien Douheret
<sebastien.douheret@iot.bzh>
Tue, 12 Dec 2017 11:12:28 +0000
(12:12 +0100)
main.go
patch
|
blob
|
history
diff --git
a/main.go
b/main.go
index
bf03375
..
2d0c179
100644
(file)
--- 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)