logs ignore healthcheck requests.
This commit is contained in:
parent
ce42d81eeb
commit
35a092630e
@ -13,6 +13,12 @@ func Logger(next http.Handler) http.Handler {
|
|||||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||||
req := map[string]interface{}{}
|
req := map[string]interface{}{}
|
||||||
|
|
||||||
|
// ignore healthcheck
|
||||||
|
if r.RequestURI == "/health" {
|
||||||
|
next.ServeHTTP(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if reqID := middleware.GetReqID(r.Context()); reqID != "" {
|
if reqID := middleware.GetReqID(r.Context()); reqID != "" {
|
||||||
req["id"] = reqID
|
req["id"] = reqID
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user