From 6fe353cfa4774a7c52c14651b0bbefa7895d4bf5 Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 30 Aug 2022 10:32:36 -0500 Subject: [PATCH] fix: Fixes lua log lines. When using directly log( the log lines come from `general` not from the module itself. `Aug 29 19:38:08 general info Starting speakerstats for conference...` --- resources/prosody-plugins/mod_av_moderation_component.lua | 2 +- .../prosody-plugins/mod_conference_duration_component.lua | 4 ++-- resources/prosody-plugins/mod_speakerstats_component.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/prosody-plugins/mod_av_moderation_component.lua b/resources/prosody-plugins/mod_av_moderation_component.lua index 172fc0b8a..ff4160939 100644 --- a/resources/prosody-plugins/mod_av_moderation_component.lua +++ b/resources/prosody-plugins/mod_av_moderation_component.lua @@ -8,7 +8,7 @@ local st = require 'util.stanza'; local muc_component_host = module:get_option_string('muc_component'); if muc_component_host == nil then - log('error', 'No muc_component specified. No muc to operate on!'); + module:log('error', 'No muc_component specified. No muc to operate on!'); return; end diff --git a/resources/prosody-plugins/mod_conference_duration_component.lua b/resources/prosody-plugins/mod_conference_duration_component.lua index bb74df1e4..383d0ecab 100644 --- a/resources/prosody-plugins/mod_conference_duration_component.lua +++ b/resources/prosody-plugins/mod_conference_duration_component.lua @@ -13,11 +13,11 @@ end local muc_component_host = module:get_option_string("muc_component"); if muc_component_host == nil then - log("error", "No muc_component specified. No muc to operate on!"); + module:log("error", "No muc_component specified. No muc to operate on!"); return; end -log("info", "Starting conference duration timer for %s", muc_component_host); +module:log("info", "Starting conference duration timer for %s", muc_component_host); function occupant_joined(event) local room = event.room; diff --git a/resources/prosody-plugins/mod_speakerstats_component.lua b/resources/prosody-plugins/mod_speakerstats_component.lua index 65f9aef29..dd6956490 100644 --- a/resources/prosody-plugins/mod_speakerstats_component.lua +++ b/resources/prosody-plugins/mod_speakerstats_component.lua @@ -20,12 +20,12 @@ local muc_component_host = module:get_option_string("muc_component"); local muc_domain_base = module:get_option_string("muc_mapper_domain_base"); if muc_component_host == nil or muc_domain_base == nil then - log("error", "No muc_component specified. No muc to operate on!"); + module:log("error", "No muc_component specified. No muc to operate on!"); return; end local breakout_room_component_host = "breakout." .. muc_domain_base; -log("info", "Starting speakerstats for %s", muc_component_host); +module:log("info", "Starting speakerstats for %s", muc_component_host); local main_muc_service;