From 8d86aa93a8b56e36600fea3f5a7bdd01e5346ca0 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 22 Apr 2020 17:35:19 +0100 Subject: [PATCH] Debug output for syncs again --- syncapi/sync/requestpool.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index 69efd8aa8..8c65d5637 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -15,6 +15,8 @@ package sync import ( + "encoding/json" + "fmt" "net/http" "time" @@ -124,6 +126,10 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtype if !syncData.IsEmpty() || hasTimedOut { logger.WithField("next", syncData.NextBatch).WithField("timed_out", hasTimedOut).Info("Responding") + + j, _ := json.MarshalIndent(syncData, "", " ") + fmt.Println(string(j)) + return util.JSONResponse{ Code: http.StatusOK, JSON: syncData,