on main help sign in
fix: improve provider cache logs (#885)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit3cd1515932ece0953a8e968ef4f3c8a9eb375560 authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateMon 25 Aug 2025, 12:56 (1 year ago) parent9d93720
1 file changed+3−2
internal/config/provider.go+3−2
internal/config/provider.go+3−2
@@ -100,7 +100,7 @@ func loadProviders(client ProviderClient, path string) (providerList []catwalk.P
100100 providerList, err = loadProvidersFromCache(path)
101101 if len(providerList) > 0 && err == nil {
102102 go func() {
103− slog.Info("Updating provider cache in background")
103+ slog.Info("Updating provider cache in background", "path", path)
104104 updated, uerr := client.GetProviders()
105105 if len(updated) > 0 && uerr == nil {
106106 _ = saveProvidersInCache(path, updated)
@@ -110,7 +110,7 @@ func loadProviders(client ProviderClient, path string) (providerList []catwalk.P
110110 }
111111 }
112112
113− slog.Info("Getting live provider data")
113+ slog.Info("Getting live provider data", "path", path)
114114 providerList, err = client.GetProviders()
115115 if len(providerList) > 0 && err == nil {
116116 err = saveProvidersInCache(path, providerList)
@@ -120,6 +120,7 @@ func loadProviders(client ProviderClient, path string) (providerList []catwalk.P
120120 err = fmt.Errorf("failed to load providers")
121121 return
122122 }
123+ slog.Info("Loading provider data from cache", "path", path)
123124 providerList, err = loadProvidersFromCache(path)
124125 return
125126}