Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 43ee64d

Browse files
authored
Fix panic on serve logging and add message (#98)
* Fix panic on serve logging and add message * Also do the same on errors
1 parent b7a0ff5 commit 43ee64d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/httpAuth/mtls/certificate.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ func (wc *wrappedCertificate) autoRefresh() {
110110
select {
111111
case event, ok := <-watcher.Events:
112112
if !ok {
113-
logging.Log.Warn("problem with mTLS file watcher")
114113
return
115114
}
116115
logging.Log.Debugf("event received: %v", event)
@@ -119,10 +118,9 @@ func (wc *wrappedCertificate) autoRefresh() {
119118
}
120119
case watcherError, ok := <-watcher.Errors:
121120
if !ok {
122-
logging.Log.Warn("problem with mTLS file watcher")
123121
return
124122
}
125-
logging.Log.Error(watcherError)
123+
logging.LogError(watcherError, "problem with mTLS file watcher")
126124
}
127125
}
128126
}()

pkg/server/middleware.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func AWSHeaderMiddleware(next http.HandlerFunc) http.HandlerFunc {
9292
"user-agent": ua,
9393
"path": r.URL.Path,
9494
"metadata_version": metadataVersion,
95-
}).Info()
95+
}).Info("Running AWS Header Middleware")
9696
next.ServeHTTP(w, r)
9797
}
9898
}

0 commit comments

Comments
 (0)