diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-11 00:18:13 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-11 00:18:13 +0200 |
commit | b85a3646ea13a26b2d8506531d2bdf072db81837 (patch) | |
tree | 1ad144d438ea03678b4a5d41411a130a203bc0a9 | |
parent | 6fbac590374db31f6dd03cafc363657efc6f4a44 (diff) | |
download | luaotfload-b85a3646ea13a26b2d8506531d2bdf072db81837.tar.gz |
enable overrides for Context loggers
-rw-r--r-- | luaotfload.lua | 2 | ||||
-rwxr-xr-x | mkluatexfontdb.lua | 1 | ||||
-rw-r--r-- | otfl-font-nms.lua | 4 | ||||
-rw-r--r-- | otfl-luat-ovr.lua | 25 |
4 files changed, 15 insertions, 17 deletions
diff --git a/luaotfload.lua b/luaotfload.lua index c90109d..10e3373 100644 --- a/luaotfload.lua +++ b/luaotfload.lua @@ -204,9 +204,9 @@ add_to_callback("hpack_filter", loadmodule"font-otc.lua" -- TODO check what we can drop from otfl-features loadmodule"lib-dir.lua" -- required by font-nms; will change with lualibs update +loadmodule"luat-ovr.lua" loadmodule"font-nms.lua" loadmodule"font-clr.lua" ---loadmodule"font-ovr.lua" loadmodule"font-ltx.lua" create_callback("luaotfload.patch_font", "simple", dummy_function) diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua index 0a2ddd3..69f22a0 100755 --- a/mkluatexfontdb.lua +++ b/mkluatexfontdb.lua @@ -22,6 +22,7 @@ dofile(loader_path) -- FIXME this pollutes stdout with filenames require"lualibs" require"otfl-basics-gen.lua" +require"otfl-luat-ovr.lua" require"otfl-font-nms" require"alt_getopt" diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index a0d81ae..856046c 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -268,10 +268,6 @@ local function log (category, fmt, ...) end end -logs = logs or { } -logs.report = logs.report or log -logs.info = logs.info or log - local function font_fullinfo(filename, subfont, texmf) local t = { } local f = fontloader.open(filename, subfont) diff --git a/otfl-luat-ovr.lua b/otfl-luat-ovr.lua index 63a9e19..984dbf5 100644 --- a/otfl-luat-ovr.lua +++ b/otfl-luat-ovr.lua @@ -7,30 +7,31 @@ if not modules then modules = { } end modules ['luat-ovr'] = { } -local write_nl, format, name = texio.write_nl, string.format, "luaotfload" -local dummyfunction = function() end +local module_name = "luaotfload" -callbacks = { - register = dummyfunction, -} +local texiowrite_nl = texio.write_nl +local stringformat = string.format +local ioflush = io.flush +local dummyfunction = function() end function logs.report(category,fmt,...) if fmt then - write_nl('log', format("%s | %s: %s",name,category,format(fmt,...))) + texiowrite_nl('log', stringformat("%s | %s: %s",module_name,category,stringformat(fmt,...))) elseif category then - write_nl('log', format("%s | %s",name,category)) + texiowrite_nl('log', stringformat("%s | %s",module_name,category)) else - write_nl('log', format("%s |",name)) + texiowrite_nl('log', stringformat("%s |",module_name)) end end function logs.info(category,fmt,...) if fmt then - write_nl(format("%s | %s: %s",name,category,format(fmt,...))) + texiowrite_nl(stringformat("%s | %s: %s",module_name,category,stringformat(fmt,...))) elseif category then - write_nl(format("%s | %s",name,category)) + texiowrite_nl(stringformat("%s | %s",module_name,category)) else - write_nl(format("%s |",name)) + texiowrite_nl(stringformat("%s |",module_name)) end - io.flush() + ioflush() end + |