diff --git a/proxy/internal/accesslog/middleware.go b/proxy/internal/accesslog/middleware.go index a1843c120..27b072483 100644 --- a/proxy/internal/accesslog/middleware.go +++ b/proxy/internal/accesslog/middleware.go @@ -6,6 +6,7 @@ import ( "time" "github.com/rs/xid" + log "github.com/sirupsen/logrus" "github.com/netbirdio/netbird/proxy/internal/auth" "github.com/netbirdio/netbird/proxy/internal/proxy" @@ -13,6 +14,7 @@ import ( func (l *Logger) Middleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + log.Debugf("access log middleware invoked for %s %s", r.Method, r.URL.Path) // Use a response writer wrapper so we can access the status code later. sw := &statusWriter{ w: w, diff --git a/proxy/internal/auth/middleware.go b/proxy/internal/auth/middleware.go index 4a23dcc7e..5bfeb4156 100644 --- a/proxy/internal/auth/middleware.go +++ b/proxy/internal/auth/middleware.go @@ -69,7 +69,7 @@ func (mw *Middleware) Protect(next http.Handler) http.Handler { config, exists := mw.domains[host] mw.domainsMux.RUnlock() - log.Tracef("checking authentication for host: %s, exists: %t", host, exists) + log.Debugf("checking authentication for host: %s, exists: %t", host, exists) // Domains that are not configured here or have no authentication schemes applied should simply pass through. if !exists || len(config.Schemes) == 0 { diff --git a/proxy/internal/proxy/servicemapping.go b/proxy/internal/proxy/servicemapping.go index 85c326f5e..9bcf56478 100644 --- a/proxy/internal/proxy/servicemapping.go +++ b/proxy/internal/proxy/servicemapping.go @@ -37,7 +37,7 @@ func (p *ReverseProxy) findTargetForRequest(req *http.Request) (*url.URL, string host = h } - log.Tracef("looking for mapping for host: %s, path: %s", host, req.URL.Path) + log.Debugf("looking for mapping for host: %s, path: %s", host, req.URL.Path) m, exists := p.mappings[host] if !exists { return nil, "", "", false