Changeset

5102:9eed88ac8ee8

mod_s2soutinjection: Use module logging API _G.log exists but modules should normally use module:log(), or session.log where applicable.
author Kim Alvefur <zash@zash.se>
date Fri, 02 Dec 2022 22:05:13 +0100
parents 5101:801ca82b6538
children 5103:4fb922aa0ace
files mod_s2soutinjection/mod_s2soutinjection.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2soutinjection/mod_s2soutinjection.lua	Fri Dec 02 22:03:29 2022 +0100
+++ b/mod_s2soutinjection/mod_s2soutinjection.lua	Fri Dec 02 22:05:13 2022 +0100
@@ -69,13 +69,13 @@
 	local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;
 	local inject = injected and injected[to_host];
 	if not inject then return end
-	log("debug", "opening a new outgoing connection for this stanza");
+	module:log("debug", "opening a new outgoing connection for this stanza");
 	local host_session = new_outgoing(from_host, to_host);
 
 	-- Store in buffer
 	host_session.bounce_sendq = bounce_sendq;
 	host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} };
-	log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name));
+	module:log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name));
 
 	local host, port = inject[1] or inject, tonumber(inject[2]) or 5269;