From 5463542d926a6ca73d86251154cabc00a9333fa5 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 18 Aug 2011 17:40:23 +0300 Subject: beta 2011.08.18 16:00 --- tex/context/base/lpdf-xmp.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tex/context/base/lpdf-xmp.lua') diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua index 557141449..02d37342b 100644 --- a/tex/context/base/lpdf-xmp.lua +++ b/tex/context/base/lpdf-xmp.lua @@ -10,9 +10,11 @@ if not modules then modules = { } end modules ['lpdf-xmp'] = { local format, random, char, gsub, concat = string.format, math.random, string.char, string.gsub, table.concat local xmlfillin = xml.fillin -local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end) +local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end) +local trace_info = false trackers.register("backend.info", function(v) trace_info = v end) -local report_xmp = logs.reporter("backend","xmp") +local report_xmp = logs.reporter("backend","xmp") +local report_info = logs.reporter("backend","info") local backends, lpdf = backends, lpdf @@ -122,7 +124,11 @@ local addxmpinfo = lpdf.addxmpinfo function lpdf.addtoinfo(tag,pdfvalue,strvalue) addtoinfo(tag,pdfvalue) - addxmpinfo(tag,strvalue or gsub(tostring(pdfvalue),"^%((.*)%)$","%1")) -- hack + local value = strvalue or gsub(tostring(pdfvalue),"^%((.*)%)$","%1") -- hack + if trace_info then + report_info("set '%s' to '%s'",tag,value) + end + addxmpinfo(tag,value) end -- for the do-it-yourselvers -- cgit v1.2.3