diff options
-rwxr-xr-x | apt-panopticon.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 16a4b3a..b44843b 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1194,13 +1194,16 @@ else | |||
1194 | end | 1194 | end |
1195 | 1195 | ||
1196 | local combine = function(ip, a) | 1196 | local combine = function(ip, a) |
1197 | if not APT.logOpen(hst, ip) then print('PROBLEM OPENING LOG FILE ' .. hst .. ' ' .. ip) end | 1197 | if not APT.logOpen(hst, ip) then |
1198 | APT.logFile:write('<h1>Note log lines will be out of order, this is a bunch of other log files combined.</h1>\n') | 1198 | print('PROBLEM OPENING LOG FILE ' .. hst .. ' ' .. ip) |
1199 | for i, f in pairs(a) do | 1199 | else |
1200 | f = f:sub(9, -1) | 1200 | APT.logFile:write('<h1>Note log lines will be out of order, this is a bunch of other log files combined.</h1>\n') |
1201 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') | 1201 | for i, f in pairs(a) do |
1202 | for ln in io.lines('results/' .. f) do | 1202 | f = f:sub(9, -1) |
1203 | if ln:match('^' .. os.date('!%Y%-%m%-%d ') .. '.*$') then APT.logFile:write(ln .. '\n') end -- %F isn't good enough, coz we have to escape the '-'. | 1203 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') |
1204 | for ln in io.lines('results/' .. f) do | ||
1205 | if ln:match('^' .. os.date('!%Y%-%m%-%d ') .. '.*$') then APT.logFile:write(ln .. '\n') end -- %F isn't good enough, coz we have to escape the '-'. | ||
1206 | end | ||
1204 | end | 1207 | end |
1205 | end | 1208 | end |
1206 | APT.logPost() | 1209 | APT.logPost() |