From 8c4aa67e7b22f008549b84ff0884fb11ed6da335 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Fri, 25 Aug 2023 01:24:32 +0100 Subject: [PATCH] Record the number of currently running goroutines --- servers/https.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/https.go b/servers/https.go index ee93d22..269906e 100644 --- a/servers/https.go +++ b/servers/https.go @@ -11,6 +11,7 @@ import ( "log" "net/http" "path" + "runtime" "time" ) @@ -18,7 +19,7 @@ import ( // endpoints for the reverse proxy. func NewHttpsServer(conf *conf.Conf) *http.Server { r := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - log.Printf("[Debug] Request: %s - '%s' - '%s' - '%s' - len: %d\n", req.Method, req.URL.String(), req.RemoteAddr, req.Host, req.ContentLength) + log.Printf("[Debug] Request: %s - '%s' - '%s' - '%s' - len: %d - thread: %d\n", req.Method, req.URL.String(), req.RemoteAddr, req.Host, req.ContentLength, runtime.NumGoroutine()) conf.Router.ServeHTTP(rw, req) }) favMiddleware := setupFaviconMiddleware(conf.Favicons, r)