From 70a10ea1d6ac7a2f7fff044752522f36b74d4117 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 15 Apr 2025 10:07:26 +0200 Subject: [PATCH] feat(assist-api): extra debug logs --- ee/backend/pkg/assist/api/handlers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ee/backend/pkg/assist/api/handlers.go b/ee/backend/pkg/assist/api/handlers.go index dbf033392..e8eafe725 100644 --- a/ee/backend/pkg/assist/api/handlers.go +++ b/ee/backend/pkg/assist/api/handlers.go @@ -1,6 +1,7 @@ package api import ( + "context" "encoding/json" "fmt" "net/http" @@ -100,6 +101,7 @@ func (e *handlersImpl) autocomplete(w http.ResponseWriter, r *http.Request) { e.responser.ResponseWithError(e.log, r.Context(), w, http.StatusInternalServerError, err, startTime, r.URL.Path, bodySize) return } + e.log.Debug(context.Background(), "autocomplete request, projectKey: %s, query: %s, response: %v", projectKey, query.Value, resp) e.responser.ResponseWithJSON(e.log, r.Context(), w, resp, startTime, r.URL.Path, bodySize) } @@ -134,6 +136,7 @@ func (e *handlersImpl) socketsListByProject(w http.ResponseWriter, r *http.Reque e.responser.ResponseWithError(e.log, r.Context(), w, http.StatusInternalServerError, err, startTime, r.URL.Path, bodySize) return } + e.log.Debug(context.Background(), "socketsListByProject request, projectKey: %s, sessionID: %s, response: %v", projectKey, sessionID, resp) e.responser.ResponseWithJSON(e.log, r.Context(), w, resp, startTime, r.URL.Path, bodySize) } @@ -163,6 +166,7 @@ func (e *handlersImpl) socketsLiveByProject(w http.ResponseWriter, r *http.Reque e.responser.ResponseWithError(e.log, r.Context(), w, http.StatusInternalServerError, err, startTime, r.URL.Path, bodySize) return } + e.log.Debug(context.Background(), "socketsLiveByProject request, projectKey: %s, response: %v", projectKey, resp) e.responser.ResponseWithJSON(e.log, r.Context(), w, resp, startTime, r.URL.Path, bodySize) } @@ -197,5 +201,6 @@ func (e *handlersImpl) socketsLiveBySession(w http.ResponseWriter, r *http.Reque e.responser.ResponseWithError(e.log, r.Context(), w, http.StatusInternalServerError, err, startTime, r.URL.Path, bodySize) return } + e.log.Debug(context.Background(), "socketsLiveBySession request, projectKey: %s, sessionID: %s, response: %v", projectKey, sessionID, resp) e.responser.ResponseWithJSON(e.log, r.Context(), w, resp, startTime, r.URL.Path, bodySize) }