diff --git a/app/config.go b/app/config.go index ae5c007..f81b01b 100644 --- a/app/config.go +++ b/app/config.go @@ -36,5 +36,9 @@ func loadConfig() (*model.Config, error) { //return nil, err } + if !config.Log.Console && !config.Log.Otel && len(config.Log.File) == 0 { + config.Log.Console = true + } + return &config, nil } diff --git a/model/config.go b/model/config.go index 56e3b6d..f5c138a 100644 --- a/model/config.go +++ b/model/config.go @@ -17,7 +17,7 @@ type LogSettings struct { Json bool `json:"json" flag:"log_json|false|Log format JSON" env:"LOG_JSON"` Otel bool `json:"otel" flag:"log_otel|false|Log OTEL" env:"LOG_OTEL"` File string `json:"file" flag:"log_file||Log file directory" env:"LOG_FILE"` - Console bool `json:"console" flag:"log_console|1|Log console" env:"LOG_CONSOLE"` + Console bool `json:"console" flag:"log_console|false|Log console" env:"LOG_CONSOLE"` } type CallSettings struct {