Tweak channel registration messages

This commit is contained in:
Draycia committed 2021-12-13 20:42:19 -08:00
1 parent 17439240d6
commit ae8bf32c49
1 file changed
+4 -5
@@ -181,6 +181,9 @@ public class CarbonChannelRegistry implements ChannelRegistry, DefaultedRegistry
}); });
if (!this.channelMap.containsKey(this.defaultKey)) { if (!this.channelMap.containsKey(this.defaultKey)) {
this.logger.warn("No default channel found! Default channel key: [" + this.defaultKey().asString() + "]");
}
final List<String> channelList = new ArrayList<>(); final List<String> channelList = new ArrayList<>();
for (final ChatChannel chatChannel : this.channelMap.values()) { for (final ChatChannel chatChannel : this.channelMap.values()) {
@@ -189,9 +192,7 @@ public class CarbonChannelRegistry implements ChannelRegistry, DefaultedRegistry
final String channels = String.join(", ", channelList); final String channels = String.join(", ", channelList);
this.logger.warn("No default channel found! Default channel key: [" + this.defaultKey().asString() + "]");
this.logger.warn("Registered channels: [" + channels + "]"); this.logger.warn("Registered channels: [" + channels + "]");
}
} catch (final IOException exception) { } catch (final IOException exception) {
exception.printStackTrace(); exception.printStackTrace();
} }
@@ -260,9 +261,7 @@ public class CarbonChannelRegistry implements ChannelRegistry, DefaultedRegistry
final Key channelKey = channel.key(); final Key channelKey = channel.key();
if (this.defaultKey.equals(channelKey)) { if (this.defaultKey.equals(channelKey)) {
this.logger.info("Registering default channel with key [" + channelKey + "]"); this.logger.info("Default channel is [" + channelKey + "]");
} else {
this.logger.info("Registering channel with key [" + channelKey + "]");
} }
this.register(channelKey, channel); this.register(channelKey, channel);