diff --git a/common/src/common/log/Log.java b/common/src/common/log/Log.java index 04aa56c..712bd3d 100644 --- a/common/src/common/log/Log.java +++ b/common/src/common/log/Log.java @@ -18,7 +18,7 @@ public enum Log { TICK("Tick"), SOUND("Sound"), JNI("JNI"), - NETTY("Netty"); + NETWORK("Network"); private static class LogMessage { private final LogLevel level; diff --git a/common/src/common/network/NetConnection.java b/common/src/common/network/NetConnection.java index a18827f..fd9169c 100755 --- a/common/src/common/network/NetConnection.java +++ b/common/src/common/network/NetConnection.java @@ -46,7 +46,7 @@ public class NetConnection extends SimpleChannelInboundHandler { this.setConnectionState(PacketRegistry.HANDSHAKE); } catch(Throwable t) { - Log.JNI.error(t, "Fehler beim Aufbauen der Verbindung für Handshake"); + Log.NETWORK.error(t, "Fehler beim Aufbauen der Verbindung für Handshake"); } } @@ -54,7 +54,7 @@ public class NetConnection extends SimpleChannelInboundHandler { this.channel.attr(ATTR_STATE).set(newState); this.channel.config().setAutoRead(true); if(DEBUG) - Log.SYSTEM.info("Automatisches Lesen eingeschaltet"); + Log.NETWORK.info("Automatisches Lesen eingeschaltet"); } public void channelInactive(ChannelHandlerContext context) throws Exception { @@ -70,7 +70,7 @@ public class NetConnection extends SimpleChannelInboundHandler { else { comp = "Interner Fehler: " + throwable; if(!(throwable instanceof ClosedChannelException)) - Log.SYSTEM.error(throwable, "Fehler in der Verbindung mit %s", this.getCutAddress()); + Log.NETWORK.error(throwable, "Fehler in der Verbindung mit %s", this.getCutAddress()); } this.closeChannel(comp); @@ -78,7 +78,7 @@ public class NetConnection extends SimpleChannelInboundHandler { protected void channelRead0(ChannelHandlerContext context, Packet packet) throws Exception { if(DEBUG) - Log.SYSTEM.info("EIN: [" + context.channel().attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); + Log.NETWORK.info("EIN: [" + context.channel().attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); if(this.channel.isOpen()) { try { packet.processPacket(this.handler); @@ -137,7 +137,7 @@ public class NetConnection extends SimpleChannelInboundHandler { if(current != state) { if(DEBUG) - Log.SYSTEM.info("Automatisches Lesen ausgeschaltet"); + Log.NETWORK.info("Automatisches Lesen ausgeschaltet"); this.channel.config().setAutoRead(false); } @@ -147,7 +147,7 @@ public class NetConnection extends SimpleChannelInboundHandler { } if(DEBUG) - Log.SYSTEM.info("AUS: [" + this.channel.attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); + Log.NETWORK.info("AUS: [" + this.channel.attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); ChannelFuture future = this.channel.writeAndFlush(packet); if(listeners != null) { @@ -164,7 +164,7 @@ public class NetConnection extends SimpleChannelInboundHandler { } if(DEBUG) - Log.SYSTEM.info("AUS: [" + NetConnection.this.channel.attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); + Log.NETWORK.info("AUS: [" + NetConnection.this.channel.attr(NetConnection.ATTR_STATE).get() + "] " + packet.getClass().getName()); ChannelFuture future = NetConnection.this.channel.writeAndFlush(packet); if(listeners != null) { @@ -200,7 +200,7 @@ public class NetConnection extends SimpleChannelInboundHandler { if(this.channel != null) this.channel.flush(); if(DEBUG) - Log.SYSTEM.info("Pakete synchronisiert"); + Log.NETWORK.info("Pakete synchronisiert"); } public String getCutAddress() { @@ -261,7 +261,7 @@ public class NetConnection extends SimpleChannelInboundHandler { this.handler.onDisconnect(this.exitReason != null ? this.exitReason : "Verbindung getrennt"); } else { - Log.JNI.warn("handleDisconnection() zweifach aufgerufen"); + Log.NETWORK.warn("handleDisconnection() zweifach aufgerufen"); } } }