From 3b9305cc5d0ddb4862702699393b43cc2ad10661 Mon Sep 17 00:00:00 2001 From: Albin Antony Date: Tue, 14 Nov 2023 10:26:53 +0530 Subject: [PATCH] Update #542 Improve logs --- internal/middleware/log_api_calls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/middleware/log_api_calls.go b/internal/middleware/log_api_calls.go index 74e1746..3447a4f 100644 --- a/internal/middleware/log_api_calls.go +++ b/internal/middleware/log_api_calls.go @@ -18,7 +18,7 @@ func LogApiCalls() Middleware { return func(w http.ResponseWriter, r *http.Request) { organisationId := r.Header.Get(config.OrganizationId) - aLog := fmt.Sprintf("Organization API: %v called by user: %v", r.URL.Path, token.GetUserName(r)) + aLog := fmt.Sprintf("%v: %v called by user: %v", r.Method, r.URL.Path, token.GetUserID(r)) actionlog.LogOrgAPICalls(token.GetUserID(r), token.GetUserName(r), organisationId, aLog) // Call the next middleware/handler in chain