diff --git a/pkg/registry/http.go b/pkg/registry/http.go index 8103efc..db49f96 100644 --- a/pkg/registry/http.go +++ b/pkg/registry/http.go @@ -108,7 +108,9 @@ func (r SchemaRegistry) DownloadSchema(resourceKind, resourceAPIVersion, k8sVers return nil, errors.New(msg) } - log.Printf("using schema found at %s", url) + if r.debug { + log.Printf("using schema found at %s", url) + } if r.cache != nil { if err := r.cache.Set(resourceKind, resourceAPIVersion, k8sVersion, body); err != nil { diff --git a/pkg/registry/local.go b/pkg/registry/local.go index 56ccaf3..81d69e2 100644 --- a/pkg/registry/local.go +++ b/pkg/registry/local.go @@ -56,6 +56,8 @@ func (r LocalRegistry) DownloadSchema(resourceKind, resourceAPIVersion, k8sVersi return nil, err } - log.Printf("using schema found at %s", schemaFile) + if r.debug { + log.Printf("using schema found at %s", schemaFile) + } return content, nil }