Fix default log level

This commit is contained in:
Zoltán Papp
2024-08-06 17:21:06 +02:00
parent 0f20e2ce70
commit ad75c9f31a

View File

@@ -21,8 +21,9 @@ import (
)
const (
metricsPort = 9090
defaultLogPath = "console"
metricsPort = 9090
defaultLogLevel = "info"
defaultLogPath = "console"
)
type Config struct {
@@ -147,6 +148,10 @@ func loadConfig(configFile string) (*Config, error) {
loadedConfig.LetsencryptAWSSecretAccessKey = cobraConfig.LetsencryptAWSSecretAccessKey
}
if loadedConfig.LogLevel == "" {
loadedConfig.LogLevel = defaultLogLevel
}
if loadedConfig.LogFile == "" {
loadedConfig.LogFile = defaultLogPath
}