From a1279df8d01d54b0274dd576a4a1e8c9b700feef Mon Sep 17 00:00:00 2001
From: iuu <2167162990@qq.com>
Date: Wed, 21 Aug 2024 17:47:59 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=95=B4=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 5 ++++-
hooks/debug/debug.go | 8 ++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9624495..3df826f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,10 @@
-
+
+
+
+
diff --git a/hooks/debug/debug.go b/hooks/debug/debug.go
index fc422db..45a6130 100644
--- a/hooks/debug/debug.go
+++ b/hooks/debug/debug.go
@@ -102,22 +102,22 @@ func (h *Hook) OnRetainMessage(cl *mqtt.Client, pk packets.Packet, r int64) {
// OnQosPublish is called when a publish packet with Qos is issued to a subscriber.
func (h *Hook) OnQosPublish(cl *mqtt.Client, pk packets.Packet, sent int64, resends int) {
- h.Log.Debug("inflight out", "m", h.packetMeta(pk))
+ h.Log.Debug("在飞行中---消息已经发出但尚未收到确认", "m", h.packetMeta(pk))
}
// OnQosComplete is called when the Qos flow for a message has been completed.
func (h *Hook) OnQosComplete(cl *mqtt.Client, pk packets.Packet) {
- h.Log.Debug("inflight complete", "m", h.packetMeta(pk))
+ h.Log.Debug("飞行完成---消息已经成功发送并得到了确认", "m", h.packetMeta(pk))
}
// OnQosDropped is called the Qos flow for a message expires.
func (h *Hook) OnQosDropped(cl *mqtt.Client, pk packets.Packet) {
- h.Log.Debug("inflight dropped", "m", h.packetMeta(pk))
+ h.Log.Debug("飞行丢弃---消息在传输过程中被丢弃", "m", h.packetMeta(pk))
}
// OnLWTSent is called when a Will Message has been issued from a disconnecting client.
func (h *Hook) OnLWTSent(cl *mqtt.Client, pk packets.Packet) {
- h.Log.Debug("sent lwt for client", "method", "OnLWTSent", "client", cl.ID)
+ h.Log.Debug("sent lwt for client 遗嘱", "method", "OnLWTSent", "client", cl.ID)
}
// OnRetainedExpired is called when the server clears expired retained messages.