From 8986380e3b2377b398ddbd1093bea154b2898fb5 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Mon, 6 Feb 2017 17:04:25 +0100 Subject: [PATCH] e2option: log the result of parse() Signed-off-by: Tobias Ulmer --- generic/e2option.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/generic/e2option.lua b/generic/e2option.lua index 4f5cdcf..71e1012 100644 --- a/generic/e2option.lua +++ b/generic/e2option.lua @@ -389,6 +389,18 @@ function e2option.parse(args) end i = i + 1 end + + local t = {} + for k,v in pairs(opts) do + if type(k) == "string" then + table.insert(t, string.format("[%s]=%q", k, tostring(v))) + end + end + for k,v in ipairs(vals) do + table.insert(t, string.format("[%d]=%q", k, v)) + end + e2lib.logf(3, "e2option.parse(): %s", table.concat(t, ", ")) + if opts["Wdefault"] or opts["Wall"] then e2lib.globals.warn_category.WDEFAULT = true end -- 2.39.5