diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2009-12-09 21:45:44 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2009-12-09 21:53:24 +0200 |
commit | 4479c85beec3b201db096d9320d203a58fd210d4 (patch) | |
tree | b26480b2d452d60f7d8665bbcb98f5a18e0cf0a4 /luaotfload.dtx | |
parent | 390282f1d1566e01709a7590cd8175fc4b06c6da (diff) | |
download | luaotfload-4479c85beec3b201db096d9320d203a58fd210d4.tar.gz |
Enable logging
Redefine the dummy |logs.report()| as wrapper for |luatextra.module_info()|
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r-- | luaotfload.dtx | 27 |
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} |