diff options
author | onefang | 2022-10-18 10:33:43 +1000 |
---|---|---|
committer | onefang | 2022-10-18 10:33:43 +1000 |
commit | 9030bd872a032d4624e1787ca1383892ab6da429 (patch) | |
tree | 51ad8021c108cec592902b8b937bc7be9cee47a4 | |
parent | Print CRITICAL errors as well as putting them in the log file. (diff) | |
download | apt-panopticon-9030bd872a032d4624e1787ca1383892ab6da429.zip apt-panopticon-9030bd872a032d4624e1787ca1383892ab6da429.tar.gz apt-panopticon-9030bd872a032d4624e1787ca1383892ab6da429.tar.bz2 apt-panopticon-9030bd872a032d4624e1787ca1383892ab6da429.tar.xz |
Print the error message for not being able to open the log file, instead of trying to put it in the unopened log file.
-rw-r--r-- | apt-panopticommon.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
407 | local name = APT.logName(host, a2, a3)[1] | 407 | local name = APT.logName(host, a2, a3)[1] |
408 | if APT.checkFile(name) then return false end | 408 | if APT.checkFile(name) then return false end |
409 | APT.logFile, e = io.open(name, "a+") | 409 | APT.logFile, e = io.open(name, "a+") |
410 | if nil == APT.logFile then C('opening log file (' .. name .. ') - ' .. e); return false end | 410 | if nil == APT.logFile then print('CRITICAL - opening log file (' .. name .. ') - ' .. e); return false end |
411 | if nil ~= APT.logFile then | 411 | if nil ~= APT.logFile then |
412 | APT.logFile:write("<html><head>\n") | 412 | APT.logFile:write("<html><head>\n") |
413 | APT.logFile:write("</head><body bgcolor='black' text='white' alink='red' link='aqua' vlink='fuchsia'>\n") | 413 | APT.logFile:write("</head><body bgcolor='black' text='white' alink='red' link='aqua' vlink='fuchsia'>\n") |