summaryrefslogtreecommitdiff
path: root/otfl-luat-ovr.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-04-15 01:49:06 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-04-15 01:49:06 +0200
commit17893ca1a58ea8bcea492df192209bc96432fcd0 (patch)
tree171ec9067f6617e9a7e6c130e56b92d59505e428 /otfl-luat-ovr.lua
parent6db1231adfffc18f1d015a4b916a7ad51d9a5aa4 (diff)
downloadluaotfload-17893ca1a58ea8bcea492df192209bc96432fcd0.tar.gz
make the “verbose” switch effective
Diffstat (limited to 'otfl-luat-ovr.lua')
-rw-r--r--otfl-luat-ovr.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/otfl-luat-ovr.lua b/otfl-luat-ovr.lua
index 2a8af9e..bd04eeb 100644
--- a/otfl-luat-ovr.lua
+++ b/otfl-luat-ovr.lua
@@ -28,6 +28,7 @@ We recreate the verbosity levels previously implemented in font-nms:
--doc]]--
local loglevel = 1 --- default
+local logout = "log"
local set_loglevel = function (n)
if type(n) == "number" then
@@ -36,11 +37,20 @@ local set_loglevel = function (n)
end
logs.set_loglevel = set_loglevel
+local set_logout = function (s)
+ if s == "stdout" then
+ logout = "term"
+ --else --- remains “log”
+ end
+end
+
+logs.set_logout = set_logout
+
local log = function (category, fmt, ...)
local res = { module_name, " |" }
if category then res[#res+1] = " " .. category end
if fmt then res[#res+1] = ": " .. stringformat(fmt, ...) end
- texiowrite_nl("log", tableconcat(res))
+ texiowrite_nl(logout, tableconcat(res))
end
local stdout = function (category, fmt, ...)