diff mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua @ 6356:a115f6a68d33

mod_pubsub_serverinfo: Remove verbose debug log statements Was probably useful during development of the module, but now it just causes excessive log spam every refresh interval.
author Matthew Wild <mwild1@gmail.com>
date Wed, 14 Jan 2026 13:54:26 +0000
parents 25b091cbb471
children f24ff3e6e180
line wrap: on
line diff
--- a/mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua	Wed Jan 14 13:59:01 2026 +0100
+++ b/mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua	Wed Jan 14 13:54:26 2026 +0000
@@ -149,7 +149,6 @@
 	local domains_by_host = {}
 	for session, _ in pairs(prosody.incoming_s2s) do
 		if session ~= nil and session.from_host ~= nil and local_domain == session.to_host then
-			module:log("debug", "Local host '%s' has remote '%s' (inbound)", session.to_host, session.from_host);
 			local sessions = domains_by_host[session.to_host]
 			if sessions == nil then sessions = {} end; -- instantiate a new entry if none existed
 			sessions[session.from_host] = true
@@ -170,7 +169,6 @@
 		if data.s2sout ~= nil then
 			for _, session in pairs(data.s2sout) do
 				if session.to_host ~= nil then
-					module:log("debug", "Local host '%s' has remote '%s' (outbound)", host, session.to_host);
 					sessions[session.to_host] = true
 					domains_by_host[host] = sessions
 				end
@@ -180,7 +178,6 @@
 		-- When the instance of Prosody hosts more than one host, the other hosts can be thought of as having a 'permanent' s2s connection.
 		for host_name, host_info in pairs(prosody.hosts) do
 			if host ~= host_name and host_info.type ~= "component" then
-				module:log("debug", "Local host '%s' has remote '%s' (vhost)", host, host_name);
 				sessions[host_name] = true;
 				domains_by_host[host] = sessions
 			end
@@ -301,7 +298,6 @@
 	local cached_value = opt_in_cache[remoteDomain]
 	local ttl = cached_value and os.difftime(cached_value.expires, os.time());
 	if cached_value and ttl > (publication_interval + 60) then
-		module:log("debug", "Opt-in status (from cache) for '%s': %s", remoteDomain, cached_value.opt_in)
 		return cached_value.opt_in;
 	end