Skip to content

Commit 209ff44

Browse files
tmshortopenshift-merge-bot[bot]
authored andcommitted
UPSTREAM: <drop>: Update certpoolwatcher log levels
Cherry-pick of upstream PR 1918 Some log levels were defaultLogLevel+1 (5), change those to defaultLogLevel (4) Signed-off-by: Todd Short <[email protected]> (cherry picked from commit 2f22dcf)
1 parent 90a8792 commit 209ff44

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/shared/util/http/certlog.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func LogDockerCertificates(path string, log logr.Logger) {
3434
continue
3535
}
3636
if !fi.IsDir() {
37-
log.V(defaultLogLevel+1).Info("not a directory", "directory", path)
37+
log.V(defaultLogLevel).Info("not a directory", "directory", path)
3838
continue
3939
}
4040
dirEntries, err := os.ReadDir(path)
@@ -50,7 +50,7 @@ func LogDockerCertificates(path string, log logr.Logger) {
5050
continue
5151
}
5252
if !fi.IsDir() {
53-
log.V(defaultLogLevel+1).Info("ignoring non-directory", "path", hostPath)
53+
log.V(defaultLogLevel).Info("ignoring non-directory", "path", hostPath)
5454
continue
5555
}
5656
logPath(hostPath, "dump docker certs", log)
@@ -103,7 +103,7 @@ func logPath(path, action string, log logr.Logger) {
103103
continue
104104
}
105105
if fi.IsDir() {
106-
log.V(defaultLogLevel+1).Info("ignoring subdirectory", "directory", file)
106+
log.V(defaultLogLevel).Info("ignoring subdirectory", "directory", file)
107107
continue
108108
}
109109
logFile(e.Name(), path, action, log)

internal/shared/util/http/certutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ func NewCertPool(caDir string, log logr.Logger) (*x509.CertPool, error) {
3232
return nil, err
3333
}
3434
if fi.IsDir() {
35-
log.V(defaultLogLevel+1).Info("skip directory", "name", e.Name())
35+
log.V(defaultLogLevel).Info("skip directory", "name", e.Name())
3636
continue
3737
}
38-
log.V(defaultLogLevel+1).Info("load certificate", "name", e.Name())
38+
log.V(defaultLogLevel).Info("load certificate", "name", e.Name(), "size", fi.Size(), "modtime", fi.ModTime())
3939
data, err := os.ReadFile(file)
4040
if err != nil {
4141
return nil, fmt.Errorf("error reading cert file %q: %w", file, err)

0 commit comments

Comments
 (0)