diff options
author | Marius <mariausol@gmail.com> | 2013-08-07 12:20:30 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-08-07 12:20:30 +0300 |
commit | 0a1d66e9356ae4676438c7e1865d71331437e412 (patch) | |
tree | f217ccdca72b8506d847948a2fd9c9d496daef22 /tex/context/base/trac-log.lua | |
parent | f0394aa3f47f9256e67c3535fbb9fe8cbd70d50c (diff) | |
download | context-0a1d66e9356ae4676438c7e1865d71331437e412.tar.gz |
beta 2013.08.07 10:55
Diffstat (limited to 'tex/context/base/trac-log.lua')
-rw-r--r-- | tex/context/base/trac-log.lua | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tex/context/base/trac-log.lua b/tex/context/base/trac-log.lua index 0ae5d87e3..4ef50f5f4 100644 --- a/tex/context/base/trac-log.lua +++ b/tex/context/base/trac-log.lua @@ -271,7 +271,8 @@ if tex and (tex.jobname or tex.formatname) then translations = t end - setlogfile = ignore + setlogfile = ignore + settimedlog = ignore else @@ -339,8 +340,6 @@ else setformats = ignore settranslations = ignore - local f_timed = formatters["[%S] "] - setlogfile = function(name,keepopen) if name and name ~= "" then local localtime = os.localtime @@ -349,17 +348,27 @@ else local f = io.open(name,"ab") write_nl = function(s) writeline(s) - f:write(f_timed(localtime()),s,"\n") + f:write(localtime()," | ",s,"\n") end else write_nl = function(s) writeline(s) local f = io.open(name,"ab") - f:write(f_timed(localtime()),s,"\n") + f:write(localtime()," | ",s,"\n") f:close() end end end + setlogfile = ignore + end + + settimedlog = function() + local localtime = os.localtime + local writeline = write_nl + write_nl = function(s) + writeline(localtime() .. " | " .. s) + end + settimedlog = ignore end end @@ -374,6 +383,7 @@ logs.setformats = setformats logs.settranslations = settranslations logs.setlogfile = setlogfile +logs.settimedlog = settimedlog logs.direct = direct logs.subdirect = subdirect |