From 7da3bab9ca5511dac1d3a20965b0bf67e2347109 Mon Sep 17 00:00:00 2001 From: Devin Bileck <603793+devinbileck@users.noreply.github.com> Date: Fri, 23 Aug 2019 01:38:08 -0700 Subject: [PATCH] Suppress RPC service log entries when running as DAO lite node When running as DAO lite node, the following would get logged: > INFO b.c.dao.node.full.RpcService: The value of rpchost is > INFO b.c.dao.node.full.RpcService: Starting RPCService with btcd-cli4j version 0.5.8.4 on 127.0.0.1:8332 with user null So instead of logging it when instantiating the RPCService, log it when setting up the service. --- core/src/main/java/bisq/core/dao/node/full/RpcService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/node/full/RpcService.java b/core/src/main/java/bisq/core/dao/node/full/RpcService.java index 382b72317b1..b60b34d7276 100644 --- a/core/src/main/java/bisq/core/dao/node/full/RpcService.java +++ b/core/src/main/java/bisq/core/dao/node/full/RpcService.java @@ -103,7 +103,6 @@ public RpcService(Preferences preferences, boolean isMainnet = BisqEnvironment.getBaseCurrencyNetwork().isMainnet(); boolean isTestnet = BisqEnvironment.getBaseCurrencyNetwork().isTestnet(); boolean isDaoBetaNet = BisqEnvironment.getBaseCurrencyNetwork().isDaoBetaNet(); - log.info("The value of rpchost is {}", rpcHost); this.rpcHost = isHostSet ? rpcHost : "127.0.0.1"; this.rpcPort = isPortSet ? rpcPort : isMainnet || isDaoBetaNet ? "8332" : @@ -111,8 +110,6 @@ public RpcService(Preferences preferences, "18443"; // regtest this.rpcBlockPort = rpcBlockPort != null && !rpcBlockPort.isEmpty() ? rpcBlockPort : "5125"; - log.info("Starting RPCService with btcd-cli4j version {} on {}:{} with user {}", BtcdCli4jVersion.VERSION, - this.rpcHost, this.rpcPort, this.rpcUser); } @@ -123,6 +120,9 @@ public RpcService(Preferences preferences, void setup(ResultHandler resultHandler, Consumer errorHandler) { ListenableFuture future = executor.submit(() -> { try { + log.info("Starting RPCService with btcd-cli4j version {} on {}:{} with user {}, listening for blocknotify on port {}", + BtcdCli4jVersion.VERSION, this.rpcHost, this.rpcPort, this.rpcUser, this.rpcBlockPort); + long startTs = System.currentTimeMillis(); PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(); CloseableHttpClient httpProvider = HttpClients.custom().setConnectionManager(cm).build();