log[gateway]: detailed log

This commit is contained in:
godotg
2023-01-06 18:20:15 +08:00
parent a2d94e0e58
commit d0aa341c06
2 changed files with 10 additions and 8 deletions
@@ -53,7 +53,8 @@ public abstract class PacketBus {
public static void route(Session session, IPacket packet, IAttachment attachment) {
var packetReceiver = (IPacketReceiver) ProtocolManager.getProtocol(packet.protocolId()).receiver();
if (packetReceiver == null) {
throw new RuntimeException(StringUtils.format("no any packetReceiverDefinition found for this [packet:{}]", packet.getClass().getName()));
var name = packet.getClass().getSimpleName();
throw new RuntimeException(StringUtils.format("no any packetReceiver:[at{}] found for this packet:[{}] or no GatewayAttachment sent back if this server is gateway", name, name));
}
packetReceiver.invoke(session, packet, attachment);
}
@@ -32,16 +32,17 @@ public class Session implements Closeable {
*/
private long sid;
/**
* EN:The default user ID is an ID greater than 0, or equal 0 if there is no login
* CN:默认用户的id都是大于0的id,如果没有登录则等于0
*/
private long uid = 0;
private Channel channel;
/**
* Session附带的属性参数,消费者的属性
* EN:The default user ID is an ID greater than 0, or equal 0 if there is no login, user extra parameters
* CN:默认用户的id都是大于0的id,如果没有登录则等于0,用户额外参数
*/
private long uid = 0;
/**
* EN:Session extra parameters
* CN:Session附带的属性参数,消费者的属性
*/
private RegisterVO consumerAttribute = null;