On 5/12/2013 9:19 PM, Philipp Gesang wrote:
Hi,
in luatex-plain, the example below
\font\grk="file:LinLibertine_R.otf:+mark;+mkmk;mode=node" at 14.4pt {\grk μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος\hfill\break οὐλομένην, ἣ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε} \bye
triggers a call to onetimemessage() which is nil at the time when the upvalue is created. Can we have calls to fonts.loggers.onetimemessage() instead, so we can override that one with our own logger?
hm, don't assume that all that logging will be exposed forever in a generic way; a lot is for specific tracing only and i more or less assume that for problematic issues one will use context as benchmark anyway (in fact, I've even been thinking of a stripped down generic variant i.e. no unneccessary more context and dev related overhead (leaner and meaner) which is possible once we're stable. So it's more convenient if I just uncommented the trace-bugs elseif trace_bugs then which means that the message will not be called outside context at all.
On a related note, we would like to reduce verbosity. In luatex-basics-gen.lua, could we have:
logs = logs or { new=dummyreporter, reporter=dummyreporter, messenger=dummyreporter, report=dummyfunction, }
So we can provide our own “logs” table?
That needs thinking, as i cannot guarantee that logging will stay the same for those modules; a wrapper might be more stable, so for the moment I'll define this: local dummyreporter = function(c) return function(...) (texio.reporter or texio.write_nl)(c .. " : " .. string.formatters(...)) end end so, you can define texio.reporter which is not defined by default. (The namespaces are somewhat protected so i cannot oversee now what messing with logs will bring in terms of side effects.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------