Переглянути джерело

Add some logging in the pricesheet download

Signed-off-by: Christian Muirhead <christian.muirhead@microsoft.com>
Christian Muirhead 3 роки тому
батько
коміт
9b5a682d29
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      pkg/cloud/azureprovider.go

+ 3 - 0
pkg/cloud/azureprovider.go

@@ -1038,10 +1038,12 @@ type pricesheetDownloader struct {
 }
 
 func (d *pricesheetDownloader) run(ctx context.Context) (map[string]*AzurePricing, error) {
+	log.Infof("requesting pricesheet download link")
 	url, err := d.getPricesheetDownloadURL(ctx)
 	if err != nil {
 		return nil, fmt.Errorf("getting download URL: %w", err)
 	}
+	log.Infof("downloading pricesheet from %q", url)
 	data, err := d.saveData(ctx, url, "pricesheet")
 	if err != nil {
 		return nil, fmt.Errorf("saving pricesheet from %q: %w", url, err)
@@ -1052,6 +1054,7 @@ func (d *pricesheetDownloader) run(ctx context.Context) (map[string]*AzurePricin
 	if err != nil {
 		return nil, fmt.Errorf("reading pricesheet: %w", err)
 	}
+	log.Infof("loaded %d pricings from pricesheet", len(prices))
 	return prices, nil
 }