diff --git a/relay/cmd/main.go b/relay/cmd/main.go index 715029eb2..f980d7e22 100644 --- a/relay/cmd/main.go +++ b/relay/cmd/main.go @@ -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 }