From b68cfbed67bbe1bcf809fcbbb701edc81448edd5 Mon Sep 17 00:00:00 2001 From: Mehdi Moussaif Date: Sun, 26 Nov 2023 22:26:58 +0100 Subject: [PATCH] Added logs for when KS CLOUD is used Signed-off-by: Mehdi Moussaif --- core/core/initutils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core/initutils.go b/core/core/initutils.go index 16eff1d0..7b5862d8 100644 --- a/core/core/initutils.go +++ b/core/core/initutils.go @@ -202,7 +202,10 @@ func getPolicyGetter(ctx context.Context, loadPoliciesFromFile []string, account if accountID != "" && getter.GetKSCloudAPIConnector().GetCloudAPIURL() != "" && frameworkScope { g := getter.GetKSCloudAPIConnector() // download policy from Kubescape Cloud backend return g + } else if accountID != "" && getter.GetKSCloudAPIConnector().GetCloudAPIURL() == "" && frameworkScope { + logger.L().Ctx(ctx).Warning("Kubescape Cloud API URL is not set, loading policies from cache") } + if downloadReleasedPolicy == nil { downloadReleasedPolicy = getter.NewDownloadReleasedPolicy() } @@ -249,6 +252,8 @@ func listFrameworksNames(policyGetter getter.IPolicyGetter) []string { fw, err := policyGetter.ListFrameworks() if err == nil { return fw + } else { + logger.L().Warning("failed to list frameworks", helpers.Error(err)) } return getter.NativeFrameworks }