From e2ca2159f6952db10ad35dc961e0fa51832033bc Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 31 Jul 2013 00:59:22 +0200 Subject: avoid duplication when logging to file and stdout --- luaotfload-override.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'luaotfload-override.lua') diff --git a/luaotfload-override.lua b/luaotfload-override.lua index 19cd505..8e467d5 100644 --- a/luaotfload-override.lua +++ b/luaotfload-override.lua @@ -99,8 +99,9 @@ end local set_logout = function (s, finalizers) if s == "stdout" then - logout = "term" + logout = "redirect" elseif s == "file" then --- inject custom logger + logout = "redirect" local chan = choose_logfile () chan:write (stringformat ("logging initiated at %s", osdate ("%F %T", ostime ()))) @@ -224,7 +225,7 @@ local names_report = function (mode, lvl, ...) if loglevel >= lvl then if mode == "log" then log (...) - elseif mode == "both" and log ~= "stdout" then + elseif mode == "both" and logout ~= "redirect" then log (...) stdout (...) else -- cgit v1.2.3