mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Add seed node info, add line break
This commit is contained in:
parent
a346db696f
commit
d13b7e70fa
2 changed files with 3 additions and 2 deletions
|
@ -57,7 +57,7 @@ public class ConnectionStatistics implements MessageListener {
|
|||
String ls = System.lineSeparator();
|
||||
long now = System.currentTimeMillis();
|
||||
String conInstance = connection instanceof InboundConnection ? "Inbound" : "Outbound";
|
||||
return String.format("%s connection to %s " +
|
||||
return String.format("%s connection to %s%s " +
|
||||
"of type %s " +
|
||||
"was creation %s sec. ago (on %s) " +
|
||||
"with UID %s." + ls +
|
||||
|
@ -65,6 +65,7 @@ public class ConnectionStatistics implements MessageListener {
|
|||
"Sent data: %s;" + ls +
|
||||
"Received data: %s;",
|
||||
conInstance,
|
||||
connectionState.isSeedNode() ? "seed node " : "",
|
||||
connection.getPeersNodeAddressOptional().map(NodeAddress::getFullAddress).orElse("N/A"),
|
||||
connectionState.getPeerType().name(),
|
||||
(now - connectionCreationTimeStamp) / 1000,
|
||||
|
|
|
@ -809,7 +809,7 @@ public final class PeerManager implements ConnectionListener, PersistedDataHost
|
|||
AtomicInteger counter = new AtomicInteger();
|
||||
networkNode.getAllConnections().stream()
|
||||
.sorted(Comparator.comparingLong(o -> o.getStatistic().getLastActivityTimestamp()))
|
||||
.forEach(e -> sb.append("Connection ")
|
||||
.forEach(e -> sb.append(ls).append("Connection ")
|
||||
.append(counter.incrementAndGet()).append(": ")
|
||||
.append(e.getConnectionStatistics().getInfo()).append(ls));
|
||||
log.error(sb.toString());
|
||||
|
|
Loading…
Add table
Reference in a new issue