summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2009-12-09 21:45:44 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2009-12-09 21:53:24 +0200
commit4479c85beec3b201db096d9320d203a58fd210d4 (patch)
treeb26480b2d452d60f7d8665bbcb98f5a18e0cf0a4
parent390282f1d1566e01709a7590cd8175fc4b06c6da (diff)
downloadluaotfload-4479c85beec3b201db096d9320d203a58fd210d4.tar.gz
Enable logging
Redefine the dummy |logs.report()| as wrapper for |luatextra.module_info()|
-rw-r--r--luaotfload.dtx27
1 files changed, 27 insertions, 0 deletions
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}