From 4479c85beec3b201db096d9320d203a58fd210d4 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 9 Dec 2009 21:45:44 +0200 Subject: Enable logging Redefine the dummy |logs.report()| as wrapper for |luatextra.module_info()| --- luaotfload.dtx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'luaotfload.dtx') diff --git a/luaotfload.dtx b/luaotfload.dtx index 6a8dcf2..f15f799 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -417,9 +417,36 @@ end % Con\TeX t at all that allow other modules to be used, it provides some % low-level Con\TeX t functions. % +% \texttt{luat-dum.lua} defines some dummy functions that are used in other +% modules but not really supported outside Con\TeX t, we redefine some of +% these functions below. +% % \begin{macrocode} luaotfload.loadmodule('luat-dum.lua') -- not used in context at all + +% \end{macrocode} +% +% We redefine the dummy \texttt{logs.report} function to be usable with +% \textsf{luaotfload}. +% +% \begin{macrocode} + +function logs.report(category,fmt,...) + local log, name = luatextra.module_info, luaotfload.module.name + if fmt then + log(name, string.format("%s: %s", category, string.format(fmt,...))) + elseif category then + log(name, string.format("%s", category)) + else + log(name, "") + end +end + +% \end{macrocode} +% +% \begin{macrocode} + luaotfload.loadmodule('data-con.lua') -- maybe some day we don't need this one % \end{macrocode} -- cgit v1.2.3