<p><b>@freimair</b> commented on this pull request.</p>

<p>need to check if the <code>isDebugEnabled()</code> call isn't done by <code>log.debug("{}", a)</code> anyways.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3214#discussion_r321660293">p2p/src/main/java/bisq/network/p2p/network/Connection.java</a>:</p>
<pre style='color:#555'>> @@ -704,9 +704,10 @@ public void run() {
                     long now = System.currentTimeMillis();
                     long elapsed = now - lastReadTimeStamp;
                     if (elapsed < 10) {
-                        log.debug("We got 2 network_messages received in less than 10 ms. We set the thread to sleep " +
-                                        "for 20 ms to avoid getting flooded by our peer. lastReadTimeStamp={}, now={}, elapsed={}",
-                                lastReadTimeStamp, now, elapsed);
+                        if (log.isDebugEnabled())
</pre>
<p>I have been in the believe that this is exactly what <code>log.debug("{}", a)</code> does before the string is assembled?</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/3214#discussion_r321660470">p2p/src/main/java/bisq/network/p2p/network/Connection.java</a>:</p>
<pre style='color:#555'>> @@ -724,7 +725,8 @@ public void run() {
 
                     NetworkEnvelope networkEnvelope = networkProtoResolver.fromProto(proto);
                     lastReadTimeStamp = now;
-                    log.debug("<< Received networkEnvelope of type: " + networkEnvelope.getClass().getSimpleName());
+                    if (log.isDebugEnabled())
+                        log.debug("<< Received networkEnvelope of type: " + networkEnvelope.getClass().getSimpleName());
 
</pre>
<p>I would instead suggest:</p>
⬇️ Suggested change
<pre style="color: #555">- 
+log.debug("<< Received networkEnvelope of type: {}", networkEnvelope.getClass().getSimpleName());
</pre>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3214?email_source=notifications&email_token=AJFFTNQ42PN5MYW3PXFAH5DQIIR6VA5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4SQRQ#pullrequestreview-284764230">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNWAEJUCS4MXJWP4EQTQIIR6VANCNFSM4IUG7WEA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNUI5TNNZXJOXUW5TPDQIIR6VA5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4SQRQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3214?email_source=notifications\u0026email_token=AJFFTNQ42PN5MYW3PXFAH5DQIIR6VA5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4SQRQ#pullrequestreview-284764230",
"url": "https://github.com/bisq-network/bisq/pull/3214?email_source=notifications\u0026email_token=AJFFTNQ42PN5MYW3PXFAH5DQIIR6VA5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCD4SQRQ#pullrequestreview-284764230",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>