From 9dfa7e14c3b861ab712a56f68f558681146fd237 Mon Sep 17 00:00:00 2001 From: Todd Short Date: Tue, 15 Apr 2025 09:56:27 -0400 Subject: [PATCH] Update certpoolwatcher log levels Some log levels were defaultLogLevel+1 (5), change those to defaultLogLevel (4) Signed-off-by: Todd Short --- internal/shared/util/http/certlog.go | 6 +++--- internal/shared/util/http/certutil.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/shared/util/http/certlog.go b/internal/shared/util/http/certlog.go index 794630d98..60aa0bd19 100644 --- a/internal/shared/util/http/certlog.go +++ b/internal/shared/util/http/certlog.go @@ -34,7 +34,7 @@ func LogDockerCertificates(path string, log logr.Logger) { continue } if !fi.IsDir() { - log.V(defaultLogLevel+1).Info("not a directory", "directory", path) + log.V(defaultLogLevel).Info("not a directory", "directory", path) continue } dirEntries, err := os.ReadDir(path) @@ -50,7 +50,7 @@ func LogDockerCertificates(path string, log logr.Logger) { continue } if !fi.IsDir() { - log.V(defaultLogLevel+1).Info("ignoring non-directory", "path", hostPath) + log.V(defaultLogLevel).Info("ignoring non-directory", "path", hostPath) continue } logPath(hostPath, "dump docker certs", log) @@ -103,7 +103,7 @@ func logPath(path, action string, log logr.Logger) { continue } if fi.IsDir() { - log.V(defaultLogLevel+1).Info("ignoring subdirectory", "directory", file) + log.V(defaultLogLevel).Info("ignoring subdirectory", "directory", file) continue } logFile(e.Name(), path, action, log) diff --git a/internal/shared/util/http/certutil.go b/internal/shared/util/http/certutil.go index 864d71c65..fb7cdc4cb 100644 --- a/internal/shared/util/http/certutil.go +++ b/internal/shared/util/http/certutil.go @@ -32,10 +32,10 @@ func NewCertPool(caDir string, log logr.Logger) (*x509.CertPool, error) { return nil, err } if fi.IsDir() { - log.V(defaultLogLevel+1).Info("skip directory", "name", e.Name()) + log.V(defaultLogLevel).Info("skip directory", "name", e.Name()) continue } - log.V(defaultLogLevel+1).Info("load certificate", "name", e.Name()) + log.V(defaultLogLevel).Info("load certificate", "name", e.Name(), "size", fi.Size(), "modtime", fi.ModTime()) data, err := os.ReadFile(file) if err != nil { return nil, fmt.Errorf("error reading cert file %q: %w", file, err)