changeset 5112:9499b88f3453

mod_pubsub_mqtt: Fix some inappropriate log levels
author Matthew Wild <mwild1@gmail.com>
date Fri, 16 Dec 2022 12:12:01 +0000
parents 6ba2188e2686
children 85a7304cfea1
files mod_pubsub_mqtt/mod_pubsub_mqtt.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_mqtt/mod_pubsub_mqtt.lua	Fri Dec 16 12:11:16 2022 +0000
+++ b/mod_pubsub_mqtt/mod_pubsub_mqtt.lua	Fri Dec 16 12:12:01 2022 +0000
@@ -8,7 +8,7 @@
 local packet_handlers = {};
 
 function handle_packet(session, packet)
-	module:log("warn", "MQTT packet received! Length: %d", packet.length);
+	module:log("debug", "MQTT packet received! Length: %d", packet.length);
 	for k,v in pairs(packet) do
 		module:log("debug", "MQTT %s: %s", tostring(k), tostring(v));
 	end
@@ -32,7 +32,7 @@
 end
 
 function packet_handlers.publish(session, packet)
-	module:log("warn", "PUBLISH to %s", packet.topic);
+	module:log("info", "PUBLISH to %s", packet.topic);
 	local host, node = packet.topic:match("^([^/]+)/(.+)$");
 	local pubsub = pubsub_services[host];
 	if not pubsub then
@@ -51,7 +51,7 @@
 
 function packet_handlers.subscribe(session, packet)
 	for _, topic in ipairs(packet.topics) do
-		module:log("warn", "SUBSCRIBE to %s", topic);
+		module:log("info", "SUBSCRIBE to %s", topic);
 		local host, node = topic:match("^([^/]+)/(.+)$");
 		local pubsub = pubsub_subscribers[host];
 		if not pubsub then