mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Improve logging
This commit is contained in:
parent
814bf8d065
commit
f73c05420a
@ -162,7 +162,9 @@ public class PeerManager implements ConnectionListener {
|
||||
final boolean seedNode = isSeedNode(connection);
|
||||
|
||||
final Optional<NodeAddress> addressOptional = connection.getPeersNodeAddressOptional();
|
||||
log.info("onConnection: peer = {}{}", (addressOptional.isPresent() ? addressOptional.get().hostName : "not known yet"), seedNode ? " (SeedNode)" : "");
|
||||
log.info("onConnection: peer = {}{}",
|
||||
(addressOptional.isPresent() ? addressOptional.get().hostName : "not known yet (connection id=" + connection.getUid() + ")"),
|
||||
seedNode ? " (SeedNode)" : "");
|
||||
|
||||
if (seedNode)
|
||||
connection.setPeerType(Connection.PeerType.SEED_NODE);
|
||||
@ -184,7 +186,10 @@ public class PeerManager implements ConnectionListener {
|
||||
" / closeConnectionReason: " + closeConnectionReason);
|
||||
|
||||
final Optional<NodeAddress> addressOptional = connection.getPeersNodeAddressOptional();
|
||||
log.info("onDisconnect: peer = {}{}", (addressOptional.isPresent() ? addressOptional.get().hostName : "not known yet"), isSeedNode(connection) ? " (SeedNode)" : "");
|
||||
log.info("onDisconnect: peer = {}{} / closeConnectionReason: {}",
|
||||
(addressOptional.isPresent() ? addressOptional.get().hostName : "not known yet (connection id=" + connection.getUid() + ")"),
|
||||
isSeedNode(connection) ? " (SeedNode)" : "",
|
||||
closeConnectionReason);
|
||||
|
||||
handleConnectionFault(connection);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user