|
|
@ -138,7 +138,11 @@ func parseClientCommonCfg(fileType int, source []byte) (cfg config.ClientCommonC
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if cfg.LogFile == "console" {
|
|
|
|
|
|
|
|
cfg.LogWay = "console"
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
cfg.LogWay = "file"
|
|
|
|
|
|
|
|
}
|
|
|
|
err = cfg.Check()
|
|
|
|
err = cfg.Check()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -167,11 +171,6 @@ func parseClientCommonCfgFromCmd() (cfg config.ClientCommonConf, err error) {
|
|
|
|
cfg.LogLevel = logLevel
|
|
|
|
cfg.LogLevel = logLevel
|
|
|
|
cfg.LogFile = logFile
|
|
|
|
cfg.LogFile = logFile
|
|
|
|
cfg.LogMaxDays = int64(logMaxDays)
|
|
|
|
cfg.LogMaxDays = int64(logMaxDays)
|
|
|
|
if logFile == "console" {
|
|
|
|
|
|
|
|
cfg.LogWay = "console"
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
cfg.LogWay = "file"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cfg.DisableLogColor = disableLogColor
|
|
|
|
cfg.DisableLogColor = disableLogColor
|
|
|
|
|
|
|
|
|
|
|
|
// Only token authentication is supported in cmd mode
|
|
|
|
// Only token authentication is supported in cmd mode
|
|
|
|