From fad1dad76e8f0e0915a226c1b695234307acc304 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 17 Aug 2022 11:11:39 +0200 Subject: [PATCH] add trace logging to electrum server calls --- src/main/java/com/sparrowwallet/sparrow/net/TcpTransport.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/net/TcpTransport.java b/src/main/java/com/sparrowwallet/sparrow/net/TcpTransport.java index 451ac189..9b551ce3 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/TcpTransport.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/TcpTransport.java @@ -96,6 +96,10 @@ public class TcpTransport implements CloseableTransport, TimeoutCounter { } private void writeRequest(String request) throws IOException { + if(log.isTraceEnabled()) { + log.trace("Sending to electrum server at " + server + ": " + request); + } + PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()))); out.println(request); out.flush();