diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-09-25 20:02:27 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-09-25 20:02:27 +0200 |
commit | e5c13c74b45e08527dda1d1be1788cccd96b6dac (patch) | |
tree | 8a723643b5eba3a89a8ea752ffe427cbe64161f6 /tex/context/base/mkiv/publ-ini.lua | |
parent | f7ee609d470a08a16e5cdaad14582fc8ed993c5e (diff) | |
download | context-e5c13c74b45e08527dda1d1be1788cccd96b6dac.tar.gz |
2017-09-25 19:25:00
Diffstat (limited to 'tex/context/base/mkiv/publ-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/publ-ini.lua | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua index 3c0b1678c..e623a8d61 100644 --- a/tex/context/base/mkiv/publ-ini.lua +++ b/tex/context/base/mkiv/publ-ini.lua @@ -79,10 +79,6 @@ local v_dataset = variables.dataset local conditionals = tex.conditionals -local logsnewline = logs.newline -local logspushtarget = logs.pushtarget -local logspoptarget = logs.poptarget - local isdefined = tex.isdefined ----- basicsorter = sorters.basicsorter -- (a,b) @@ -224,15 +220,13 @@ statistics.register("publications load time", function() end end) -luatex.registerstopactions(function() - local done = false +logs.registerfinalactions(function() + local done = false + local unknown = false for name, dataset in sortedhash(datasets) do for command, n in sortedhash(dataset.commands) do if not done then - logspushtarget("logfile") - logsnewline() - report("start used btx commands") - logsnewline() + logs.startfilelogging(report,"used btx commands") done = true end if isdefined[command] then @@ -241,14 +235,23 @@ luatex.registerstopactions(function() report("%-20s %-20s % 5i %s",name,command,n,"KNOWN") else report("%-20s %-20s % 5i %s",name,command,n,"unknown") + unknown = true end end end if done then - logsnewline() - report("stop used btx commands") - logsnewline() - logspoptarget() + logs.stopfilelogging() + end + if unknown and logs.loggingerrors() then + logs.starterrorlogging(report,"unknown btx commands") + for name, dataset in sortedhash(datasets) do + for command, n in sortedhash(dataset.commands) do + if not isdefined[command] and not isdefined[upper(command)] then + report("%-20s %-20s % 5i %s",name,command,n,"unknown") + end + end + end + logs.stoperrorlogging() end end) |