# HG changeset patch # User Kim Alvefur # Date 1670015113 -3600 # Node ID 9eed88ac8ee8e4096e3d9389f8460c273b3b2c5f # Parent 801ca82b65380689523ed0932c8811c08eafda93 mod_s2soutinjection: Use module logging API _G.log exists but modules should normally use module:log(), or session.log where applicable. diff -r 801ca82b6538 -r 9eed88ac8ee8 mod_s2soutinjection/mod_s2soutinjection.lua --- 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;