diff --git a/collector/collector.go b/collector/collector.go index 49a619c..5fa94aa 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -457,19 +457,12 @@ func fetchRemoteConfig(url string) (*Config, error) { ) if err != nil { - // TODO: improve logging - fmt.Printf("WARNING: Couldn't fetch config_url: %s", err) + // TODO: This keeps the old behaviour but IMHO we should return an error here return result, nil } if !HasValidHeader(string(body)) { - // TODO: Print a warning when we implement proper logging - if err != nil { - fmt.Printf("No valid header in remote config: %s\n", err.Error()) - } else { - fmt.Println("No valid header in remote config") - } - + // TODO: This keeps the old behaviour but IMHO we should return an error here return result, nil }