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 /otfl-luat-ovr.lua | |
parent | 6fbac590374db31f6dd03cafc363657efc6f4a44 (diff) | |
download | luaotfload-b85a3646ea13a26b2d8506531d2bdf072db81837.tar.gz |
enable overrides for Context loggers
Diffstat (limited to 'otfl-luat-ovr.lua')
-rw-r--r-- | otfl-luat-ovr.lua | 25 |
1 files changed, 13 insertions, 12 deletions
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 + |