X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxdsconfig%2Fconfig.go;h=93c8f4b961ad29dedb9c67ffffc7722735a84f68;hb=refs%2Ftags%2F7.99.1;hp=352ba8406767e596cbd4bb4535ad1535cb59cb86;hpb=ee66af78c42c4d7ff33f104415bc09d60dbdc27b;p=src%2Fxds%2Fxds-agent.git diff --git a/lib/xdsconfig/config.go b/lib/xdsconfig/config.go index 352ba84..93c8f4b 100644 --- a/lib/xdsconfig/config.go +++ b/lib/xdsconfig/config.go @@ -24,7 +24,7 @@ import ( "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" @@ -93,7 +93,7 @@ func Init(ctx *cli.Context, log *logrus.Logger) (*Config, error) { }, ProfileConf: ProfileConfT{ XDSBinder: XDSBinderConf{ - URL: "http://localhost:5678", + URL: "http://localhost:8810", ConnRetry: 10, }, }, @@ -112,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 - // 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" { - 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"