mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 19:40:14 +02:00
Restructured log levels. Made 'undefined packet' log as debug
This commit is contained in:
parent
4bdf856363
commit
cb02cc498b
@ -39,7 +39,7 @@ public class PacketDecoder extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
|
|
||||||
ctx.fireChannelRead(packet);
|
ctx.fireChannelRead(packet);
|
||||||
} else {
|
} else {
|
||||||
Logger.warning("Undefined incoming packet: 0x" + Integer.toHexString(packetId));
|
Logger.debug("Undefined incoming packet: 0x" + Integer.toHexString(packetId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet> {
|
|||||||
Logger.debug("Sending %s packet (%d bytes)", packet.toString(), msg.readableBytes());
|
Logger.debug("Sending %s packet (%d bytes)", packet.toString(), msg.readableBytes());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.warning("Cannot encode packet 0x%s: %s", Integer.toHexString(packetId), e.getMessage());
|
Logger.error("Cannot encode packet 0x%s: %s", Integer.toHexString(packetId), e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ public final class Logger {
|
|||||||
|
|
||||||
public enum Level {
|
public enum Level {
|
||||||
|
|
||||||
INFO ("INFO", 0),
|
ERROR("ERROR", 1),
|
||||||
DEBUG ("DEBUG", 1),
|
|
||||||
WARNING("WARNING", 2),
|
WARNING("WARNING", 2),
|
||||||
ERROR("ERROR", 3);
|
INFO ("INFO", 3),
|
||||||
|
DEBUG ("DEBUG", 4);
|
||||||
|
|
||||||
private final String display;
|
private final String display;
|
||||||
private final int index;
|
private final int index;
|
||||||
|
@ -85,13 +85,13 @@ infoForwarding:
|
|||||||
# Read timeout for connections in milliseconds
|
# Read timeout for connections in milliseconds
|
||||||
readTimeout: 30000
|
readTimeout: 30000
|
||||||
|
|
||||||
# Define debug level. On release, i recommend to use 0 level, since
|
# Define log level. On release, I'd recommend to use level 3
|
||||||
# there are many useless for release information about ping, received packets, etc.
|
# Log levels:
|
||||||
# Levels:
|
# 0 - Display nothing
|
||||||
# 0 - Display only useful info
|
# 1 - Display only errors
|
||||||
# 1 - Display info and some debug
|
# 2 - Display errors, warnings
|
||||||
# 2 - Display info and warnings
|
# 3 - Display errors, warnings, info
|
||||||
# 3 - Display info, warnings, errors
|
# 4 - Display errors, warnings, info, debug
|
||||||
debugLevel: 3
|
debugLevel: 3
|
||||||
|
|
||||||
# Warning! Do not touch params of this block, if you not completely sure what is this!
|
# Warning! Do not touch params of this block, if you not completely sure what is this!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user