From 18dd54b8f0ba73abd84397977712926d3491f088 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 25 Dec 2019 23:10:15 +1000 Subject: Use proper time and date format, and check for the directory before tarballing it up. --- apt-panopticommon.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-panopticommon.lua') diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index 37b43e4..55f0e40 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua @@ -378,7 +378,7 @@ local log = function(v, t, s, prot, test, host) end end if v <= APT.verbosity then - if 3 <= APT.verbosity then t = os.date() .. " " .. t end + if 3 <= APT.verbosity then t = os.date('!%F %T') .. " " .. t end print(t .. ": " .. s) end if nil ~= APT.logFile then @@ -390,9 +390,9 @@ local log = function(v, t, s, prot, test, host) if 2 == v then colour = "blue " end -- TIMEOUT if 3 == v then colour = "white " end -- INFO if 4 == v then colour = "gray " end -- DEBUG - APT.logFile:write(os.date() .. " " .. t .. ": " .. s .. "
\n") + APT.logFile:write(os.date('!%F %T') .. " " .. t .. ": " .. s .. "
\n") else - APT.logFile:write(os.date() .. " " .. t .. ": " .. s .. "\n") + APT.logFile:write(os.date('!%F %T') .. " " .. t .. ": " .. s .. "\n") end APT.logFile:flush() end -- cgit v1.1