Просмотр исходного кода

Remove extraneous logging

Signed-off-by: Matt Ray <github@mattray.dev>
Matt Ray 2 лет назад
Родитель
Сommit
eca3be7a6c
3 измененных файлов с 1 добавлено и 13 удалено
  1. 0 3
      pkg/cloud/config/watcher.go
  2. 1 3
      pkg/cmd/costmodel/costmodel.go
  3. 0 7
      pkg/costmodel/router.go

+ 0 - 3
pkg/cloud/config/watcher.go

@@ -30,7 +30,6 @@ type HelmWatcher struct {
 // only one billing integration due to values being shared by different configuration types.
 func (hw *HelmWatcher) GetConfigs() []cloud.KeyedConfig {
 	var configs []cloud.KeyedConfig
-	log.Info("+++HelmWatcher GetConfigs")
 
 	customPricing, _ := hw.providerConfig.GetCustomPricingData()
 
@@ -150,8 +149,6 @@ type ConfigFileWatcher struct {
 func (cfw *ConfigFileWatcher) GetConfigs() []cloud.KeyedConfig {
 	var configs []cloud.KeyedConfig
 
-	log.Info("+++ConfigFileWatcher GetConfigs")
-
 	customPricing, _ := cfw.providerConfig.GetCustomPricingData()
 
 	// Detect Azure Storage configuration

+ 1 - 3
pkg/cmd/costmodel/costmodel.go

@@ -34,7 +34,7 @@ func Healthz(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
 
 func Execute(opts *CostModelOpts) error {
 	log.Infof("Starting cost-model version %s", version.FriendlyVersion())
-	log.Debugf("Kubernetes enabled: %t", env.IsKubernetesEnabled())
+	log.Infof("Kubernetes enabled: %t", env.IsKubernetesEnabled())
 
 	var a *costmodel.Accesses
 
@@ -52,8 +52,6 @@ func Execute(opts *CostModelOpts) error {
 	log.Infof("Cloud Costs enabled: %t", env.IsCloudCostEnabled())
 	if env.IsCloudCostEnabled() {
 		repo := cloudcost.NewMemoryRepository()
-		keys, _ := repo.Keys()
-		log.Infof("repo: %v", keys)
 		a.CloudCostPipelineService = cloudcost.NewPipelineService(repo, a.CloudConfigController, cloudcost.DefaultIngestorConfiguration())
 		repoQuerier := cloudcost.NewRepositoryQuerier(repo)
 		a.CloudCostQueryService = cloudcost.NewQueryService(repoQuerier, repoQuerier)

+ 0 - 7
pkg/costmodel/router.go

@@ -1493,8 +1493,6 @@ func handlePanic(p errors.Panic) bool {
 func Initialize(additionalConfigWatchers ...*watcher.ConfigMapWatcher) *Accesses {
 	configWatchers := watcher.NewConfigMapWatchers(additionalConfigWatchers...)
 
-	log.Debugf("Initialize-START: %v", configWatchers.GetWatchedConfigs())
-
 	var err error
 	if errorReportingEnabled {
 		err = sentry.Init(sentry.ClientOptions{Release: version.FriendlyVersion()})
@@ -1827,16 +1825,12 @@ func Initialize(additionalConfigWatchers ...*watcher.ConfigMapWatcher) *Accesses
 
 	a.httpServices.RegisterAll(a.Router)
 
-	log.Debugf("Initialize-START: %v", configWatchers.GetWatchedConfigs())
-
 	return a
 }
 
 func InitializeWithoutKubernetes(additionalConfigWatchers ...*watcher.ConfigMapWatcher) *Accesses {
 	configWatchers := watcher.NewConfigMapWatchers(additionalConfigWatchers...)
 
-	log.Debugf("InitializeWithoutKubernetes-START: %v", configWatchers.GetWatchedConfigs())
-
 	var err error
 	if errorReportingEnabled {
 		err = sentry.Init(sentry.ClientOptions{Release: version.FriendlyVersion()})
@@ -1862,7 +1856,6 @@ func InitializeWithoutKubernetes(additionalConfigWatchers ...*watcher.ConfigMapW
 		a.httpServices.RegisterAll(a.Router)
 	*/
 
-	log.Debugf("InitializeWithoutKubernetes-END: %v", configWatchers.GetWatchedConfigs())
 	return a
 }