From 86151eda5d68c1577076087dc52322a101e95b92 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 12 Jan 2026 15:36:38 +1100 Subject: [PATCH] more logging --- cmd/server/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 499f613..a172510 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -302,6 +302,7 @@ func openAPISpecHandler(w http.ResponseWriter, r *http.Request) { } func diagramHandler(w http.ResponseWriter, r *http.Request) { + log.Printf("[diagram] %s %s from %s", r.Method, r.URL.String(), r.RemoteAddr) if r.Method == http.MethodOptions { addCORS(w) w.WriteHeader(http.StatusNoContent) @@ -309,16 +310,19 @@ func diagramHandler(w http.ResponseWriter, r *http.Request) { } id := r.URL.Query().Get("id") if id == "" { + log.Printf("[diagram] missing id") http.Error(w, "missing id", http.StatusBadRequest) return } xml, ok := diagramStore.data[id] if !ok { + log.Printf("[diagram] id not found: %s", id) http.Error(w, "not found", http.StatusNotFound) return } addCORS(w) w.Header().Set("Content-Type", "application/xml") + log.Printf("[diagram] served id %s bytes=%d", id, len(xml)) _, _ = w.Write([]byte(xml)) }