summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/make4ht/make4ht-logging.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-18 22:12:02 +0000
committerKarl Berry <karl@freefriends.org>2022-02-18 22:12:02 +0000
commita276123bbbc409023c9148d82eae1f94c79fdd13 (patch)
tree1dcf7889496ab6170d2c35a1862d7d4bb53257e0 /Master/texmf-dist/scripts/make4ht/make4ht-logging.lua
parente9e8b9b63dabdf9821d16e84dfbc64a8f1ace6f7 (diff)
make4ht (18feb22)
git-svn-id: svn://tug.org/texlive/trunk@62075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/make4ht/make4ht-logging.lua')
-rwxr-xr-xMaster/texmf-dist/scripts/make4ht/make4ht-logging.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/make4ht/make4ht-logging.lua b/Master/texmf-dist/scripts/make4ht/make4ht-logging.lua
index 63b11433ea4..0f195689c2e 100755
--- a/Master/texmf-dist/scripts/make4ht/make4ht-logging.lua
+++ b/Master/texmf-dist/scripts/make4ht/make4ht-logging.lua
@@ -4,7 +4,8 @@ local logging = {}
local levels = {}
-- level of bugs that should be shown
-local show_level = 1
+-- enable querying of current log level
+logging.show_level = 1
local max_width = 0
local max_status = 0
@@ -34,7 +35,7 @@ end
-- the logging level is set once
function logging.set_level(name)
local level = levels[name] or 1
- show_level = level
+ logging.show_level = level
end
function logging.print_msg(header, message, color)
@@ -53,7 +54,7 @@ function logging.new(module)
module = module,
output = function(self, output)
-- used for printing of output of commands
- if show_level <= (levels[debug] or 1) then
+ if logging.show_level <= (levels["debug"] or 1) then
print(output)
end
end
@@ -68,7 +69,7 @@ function logging.new(module)
-- set make4ht exit status
max_status = math.max(status, max_status)
-- max width is saved in logging.prepare_levels
- if mode.level >= show_level then
+ if mode.level >= logging.show_level then
-- support variable number of parameters
local table_with_holes = table.pack(...)
local table_without_holes = {}
@@ -106,6 +107,7 @@ logging.prepare_levels()
-- logging.set_level("error")
-- cls:info("level set")
-- cls:error("just print the error")
+--
return logging