From f25664e9a9daa8037eee4e320901dfc22f1a32d8 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Mon, 4 Nov 2024 13:59:45 +0100 Subject: [PATCH] MT#61437 utils: don't require logging globally ngcp.utils is used in ngcp-prosody-modules and that is used in Lua5.4 lua-logging doesn't work with lua5.4 Change-Id: Id5e2f2afb7ab780d38b4b2ccdd388b0b5c2c4a27 (cherry picked from commit 7ca0637e6167c60c0b3d27f051db662b8a813039) (cherry picked from commit 831bcbf11b715a2eb35bb67c978f5bc488a7a129) (cherry picked from commit c31cf5b4ac50571b1426bfb562990aea6bbe1cb3) (cherry picked from commit 6c58ab44da3270557b62108e00d7cd31f940dd92) --- ngcp/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngcp/utils.lua b/ngcp/utils.lua index 392f36a..d28faf6 100644 --- a/ngcp/utils.lua +++ b/ngcp/utils.lua @@ -17,8 +17,6 @@ -- On Debian systems, the complete text of the GNU General -- Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". -- -local logging = require ('logging') -local log_file = require ('logging.file') -- Lua utils local utils = {} utils.table = {} @@ -469,6 +467,8 @@ end utils.Stack = Stack function utils.KSR_log(KSR, logfile) + local logging = require ('logging') + local log_file = require ('logging.file') -- KSR has already the metatable if KSR._logger then KSR._logger = log_file(logfile, "%Y-%m-%d")