From: David ‘Bombe’ Roden Date: Mon, 10 Aug 2015 16:45:48 +0000 (+0200) Subject: Improve logging X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=82dbd8dd4022906970f8851080df22c77d0111af;p=xudocci.git Improve logging --- diff --git a/src/main/java/net/pterodactylus/irc/DefaultConnection.java b/src/main/java/net/pterodactylus/irc/DefaultConnection.java index d352b55..79ab87b 100644 --- a/src/main/java/net/pterodactylus/irc/DefaultConnection.java +++ b/src/main/java/net/pterodactylus/irc/DefaultConnection.java @@ -356,7 +356,7 @@ public class DefaultConnection extends AbstractExecutionThreadService implements } finally { established.set(false); eventBus.unregister(this); - logger.info("Closing Connection."); + logger.info(String.format("Closing Connection to %s:%d.", hostname, port)); try { Closeables.close(connectionHandler, true); } catch (IOException ioe1) { diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 24727d9..649db75 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -508,10 +508,13 @@ public class Core extends AbstractExecutionThreadService { * The connection to remove */ private void removeConnection(Connection connection) { + logger.debug(String.format("Removing Connection %s...", connection)); Optional network = getNetwork(connection); if (!network.isPresent()) { + logger.debug(String.format("Connection %s did not belong to any network.", connection)); return; } + logger.debug(String.format("Connection %s belongs to network %s.", connection, network.get())); networkConnections.remove(network.get()); /* find all channels that need to be removed. */ @@ -521,7 +524,7 @@ public class Core extends AbstractExecutionThreadService { if (!joinedChannel.network().equals(network.get())) { continue; } - + logger.debug(String.format("Channel %s will be removed.", joinedChannel)); channelIterator.remove(); } }