Code Review
/
src
/
xds
/
xds-agent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Use go module as dependency tool instead of glide
[src/xds/xds-agent.git]
/
lib
/
xdsconfig
/
config.go
diff --git
a/lib/xdsconfig/config.go
b/lib/xdsconfig/config.go
index
b7bf57b
..
93c8f4b
100644
(file)
--- a/
lib/xdsconfig/config.go
+++ b/
lib/xdsconfig/config.go
@@
-24,7
+24,7
@@
import (
"os"
"os"
- common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git
/golib
"
+ common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git"
"github.com/Sirupsen/logrus"
uuid "github.com/satori/go.uuid"
"github.com/urfave/cli"
"github.com/Sirupsen/logrus"
uuid "github.com/satori/go.uuid"
"github.com/urfave/cli"
@@
-91,6
+91,12
@@
func Init(ctx *cli.Context, log *logrus.Logger) (*Config, error) {
SThgConf: &SyncThingConf{
Home: defaultSTHomeDir,
},
SThgConf: &SyncThingConf{
Home: defaultSTHomeDir,
},
+ ProfileConf: ProfileConfT{
+ XDSBinder: XDSBinderConf{
+ URL: "http://localhost:8810",
+ ConnRetry: 10,
+ },
+ },
},
Log: log,
}
},
Log: log,
}
@@
-106,11
+112,18
@@
func Init(ctx *cli.Context, log *logrus.Logger) (*Config, error) {
// Handle where Logs are redirected:
// default 'stdout' (logfile option default value)
// else use file (or filepath) set by --logfile option
// Handle where Logs are redirected:
// default 'stdout' (logfile option default value)
// else use file (or filepath) set by --logfile option
- //
that may be overwritten by
LogsDir field of config file
+ //
else use
LogsDir field of config file
logF := c.Options.LogFile
logD := c.FileConf.LogsDir
if logF != "stdout" {
logF := c.Options.LogFile
logD := c.FileConf.LogsDir
if logF != "stdout" {
- if logD != "" {
+ if logF != "" {
+ if common.IsDir(logF) {
+ logD = logF
+ logF = filepath.Join(logF, "xds-agent.log")
+ } else {
+ logD = filepath.Dir(logF)
+ }
+ } else if logD != "" {
lf := filepath.Base(logF)
if lf == "" || lf == "." {
lf = "xds-agent.log"
lf := filepath.Base(logF)
if lf == "" || lf == "." {
lf = "xds-agent.log"