feat(config): disable logging and usage stats by default

This commit is contained in:
hkfires
2025-10-11 22:11:08 +08:00
parent 843a81f68d
commit 4c033b3af7

View File

@@ -180,8 +180,8 @@ func LoadConfigOptional(configFile string, optional bool) (*Config, error) {
// Unmarshal the YAML data into the Config struct. // Unmarshal the YAML data into the Config struct.
var cfg Config var cfg Config
// Set defaults before unmarshal so that absent keys keep defaults. // Set defaults before unmarshal so that absent keys keep defaults.
cfg.LoggingToFile = true cfg.LoggingToFile = false
cfg.UsageStatisticsEnabled = true cfg.UsageStatisticsEnabled = false
if err = yaml.Unmarshal(data, &cfg); err != nil { if err = yaml.Unmarshal(data, &cfg); err != nil {
if optional { if optional {
// In cloud deploy mode, if YAML parsing fails, return empty config instead of error. // In cloud deploy mode, if YAML parsing fails, return empty config instead of error.