From 9030bd872a032d4624e1787ca1383892ab6da429 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 18 Oct 2022 10:33:43 +1000 Subject: Print the error message for not being able to open the log file, instead of trying to put it in the unopened log file. --- apt-panopticommon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index e380e75..9fa8c78 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua @@ -407,7 +407,7 @@ APT.logOpen = function(host, a2, a3) local name = APT.logName(host, a2, a3)[1] if APT.checkFile(name) then return false end APT.logFile, e = io.open(name, "a+") - if nil == APT.logFile then C('opening log file (' .. name .. ') - ' .. e); return false end + if nil == APT.logFile then print('CRITICAL - opening log file (' .. name .. ') - ' .. e); return false end if nil ~= APT.logFile then APT.logFile:write("\n") APT.logFile:write("\n") -- cgit v1.1