Add success log messages to packet handler

Added log statements to indicate successful loading and initialization in NativePacketHandler. This improves traceability and debugging by providing clear feedback in the logs.
This commit is contained in:
手瓜一十雪 committed 2025-11-12 12:04:48 +08:00
1 parent 64f23dd740
commit 09324ac46c
1 file changed
+2
+2
View File
@@ -45,6 +45,7 @@ export class NativePacketHandler {
}
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
this.loaded = true;
this.logger.log('[PacketHandler] 加载成功');
} catch (error) {
this.logger.logError('NativePacketClient 加载出错:', error);
this.loaded = false;
@@ -216,6 +217,7 @@ export class NativePacketHandler {
this.MoeHooExport.exports.initHook?.(send, recv, (type: PacketType, uin: string, cmd: string, seq: number, hex_data: string) => {
this.emitPacket(type, uin, cmd, seq, hex_data);
}, true);
this.logger.log('[PacketHandler] 初始化成功');
return true;
} catch (error) {
this.logger.logError('NativePacketClient 初始化出错:', error);