From 726a3309b717295974587a8150151491d307b4b9 Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Wed, 18 Apr 2018 10:27:42 +0200 Subject: [PATCH] minor logging changes --- src/clj/commiteth/eth/core.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/clj/commiteth/eth/core.clj b/src/clj/commiteth/eth/core.clj index 1ed524e..93c9352 100644 --- a/src/clj/commiteth/eth/core.clj +++ b/src/clj/commiteth/eth/core.clj @@ -169,9 +169,10 @@ :body (json/write-str body)} response @(post (eth-rpc-url) options) result (safe-read-str (:body response))] - (log/infof "%s: eth-rpc %s" (or internal-tx-id "(no-tx-id)") method) - (log/debugf "eth-rpc req(%s) body: %s\neth-rpc req(%s) result: %s" - request-id body request-id result) + (when internal-tx-id + (log/infof "%s: eth-rpc %s" internal-tx-id method)) + (log/debugf "%s: eth-rpc req(%s) body: %s" internal-tx-id request-id body) + (log/debugf "%s: eth-rpc req(%s) result: %s" internal-tx-id request-id result) (cond ;; Ignore any responses that have mismatching request ID (not= (:id result) request-id)