From 6f15bc6d3ca918e5547423b1df602b6c90bb9e3e Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 28 Nov 2024 09:43:20 +0200 Subject: [PATCH] suppress jetty log initialization message --- build.gradle | 2 +- .../tern/http/client/JettyHttpClientService.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 831369c..698ed3b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = 'com.sparrowwallet' -version = '1.0.4' +version = '1.0.5' def secrets = new Properties() file("publish.properties").withInputStream { diff --git a/src/main/java/com/sparrowwallet/tern/http/client/JettyHttpClientService.java b/src/main/java/com/sparrowwallet/tern/http/client/JettyHttpClientService.java index 91fe839..ee2de47 100644 --- a/src/main/java/com/sparrowwallet/tern/http/client/JettyHttpClientService.java +++ b/src/main/java/com/sparrowwallet/tern/http/client/JettyHttpClientService.java @@ -5,6 +5,7 @@ import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.ProxyConfiguration; import org.eclipse.jetty.client.Socks4Proxy; +import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler; @@ -25,6 +26,10 @@ public class JettyHttpClientService implements IHttpClientService { // limit changing Tor identity on network error every 4 minutes private static final double RATE_CHANGE_IDENTITY_ON_NETWORK_ERROR = 1.0 / 240; + static { + Log.getProperties().setProperty("org.eclipse.jetty.util.log.announce", "false"); + } + protected Map httpClients; // used by Sparrow private final IHttpProxySupplier httpProxySupplier; private final long requestTimeout;