From 5efe78a8e9dd637155d8e09f8042331c665cd8c5 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Wed, 3 Jan 2024 17:45:55 +0000 Subject: [PATCH] Add debug log on send/receive commands --- internal/provider/provider.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index fd41562..61f3201 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -208,10 +208,17 @@ func (p *provider) ExecuteCommand(command string) (json.RawMessage, error) { } // Send over our command and listen for the result + p.log.Debug(). + Int("req_id", p.reqID). + Str("command", command). + Msg("Send request") go p.ws.WriteMessage(websocket.TextMessage, buf) select { case result := <-p.resultsCh: + p.log.Debug(). + Int("req_id", p.reqID). + Msg("Received response") return result, nil case <-time.After(providerRequestTimeout): // If the request times out shoot the underlying websocket connection to force a reconnect