Code Review
/
src
/
xds
/
xds-cli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed GOPATH setup while debugging in VSC
[src/xds/xds-cli.git]
/
main.go
diff --git
a/main.go
b/main.go
index
bf03375
..
72a9d22
100644
(file)
--- a/
main.go
+++ b/
main.go
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2017 "IoT.bzh"
+ * Copyright (C) 2017
-2018
"IoT.bzh"
* Author Sebastien Douheret <sebastien@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author Sebastien Douheret <sebastien@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-28,9
+28,10
@@
import (
"strings"
"text/tabwriter"
"strings"
"text/tabwriter"
+ "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent.git/lib/xaapiv1"
+ common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib"
"github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus"
- "github.com/iotbzh/xds-agent/lib/xaapiv1"
- common "github.com/iotbzh/xds-common/golib"
+
"github.com/joho/godotenv"
socketio_client "github.com/sebd71/go-socket.io-client"
"github.com/urfave/cli"
"github.com/joho/godotenv"
socketio_client "github.com/sebd71/go-socket.io-client"
"github.com/urfave/cli"
@@
-57,7
+58,7
@@
var AppSubVersion = "unknown-dev"
// Application details
const (
// Application details
const (
- appCopyright = "Copyright (C) 2017 IoT.bzh - Apache-2.0"
+ appCopyright = "Copyright (C) 2017
-2018
IoT.bzh - Apache-2.0"
defaultLogLevel = "error"
)
defaultLogLevel = "error"
)
@@
-320,6
+321,11
@@
func XdsConnInit(ctx *cli.Context) error {
serverURL = "http://" + serverURL
}
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{
// Create HTTP client
Log.Debugln("Connect HTTP client on ", agentURL)
conf := common.HTTPClientConfig{
@@
-328,7
+334,7
@@
func XdsConnInit(ctx *cli.Context) error {
CsrfDisable: true,
LogOut: Log.Out,
LogPrefix: "XDSAGENT: ",
CsrfDisable: true,
LogOut: Log.Out,
LogPrefix: "XDSAGENT: ",
- LogLevel:
common.HTTPLogLevelDebug
,
+ LogLevel:
lvl
,
}
HTTPCli, err = common.HTTPNewClient(agentURL, conf)
}
HTTPCli, err = common.HTTPNewClient(agentURL, conf)