OnPublished add display topic

This commit is contained in:
ssp97 2024-08-22 22:07:29 +08:00
parent c3e7360019
commit 5aeab97385

View File

@ -101,7 +101,7 @@ func (h *MqttServerHook) OnPublish(cl *mqttServerV2.Client, pk packets.Packet) (
}
func (h *MqttServerHook) OnPublished(cl *mqttServerV2.Client, pk packets.Packet) {
h.Log.Info("published to client", "client", cl.ID, "payload", string(pk.Payload))
h.Log.Info("published to client", "client", cl.ID, "topic", pk.TopicName, "payload", string(pk.Payload))
}
// OnConnectAuthenticate returns true/allowed for all requests.