Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func getDefaultConfig() Config {
_ = confparser.SetDefaultsAndValidate(c)
return c
}(),
DefaultLogLevel: "INFO",
DefaultLogLevel: "WARN",
VideoQualityFactor: 1.0,
}
}
Expand Down Expand Up @@ -272,6 +272,11 @@ func LoadConfig() {
loadedConfig.KeyboardLayout = "en-US"
}

// Migrate old verbose log level to sensible default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will effectively prevent people from selecting INFO won't it? Seems like this will run every boot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's right. Luckily, the config is not exposed for the user yet, and I had to change the log level for all because users were getting insanely large logs files. One log I saw, was 100MB in 7 days.

Once we expose this configuration to people we can remove this line, as most users will be on 'WARN' in their configuration.

if loadedConfig.DefaultLogLevel == "INFO" {
loadedConfig.DefaultLogLevel = "WARN"
}

config = &loadedConfig

logging.GetRootLogger().UpdateLogLevel(config.DefaultLogLevel)
Expand Down