From: Tobias Ulmer Date: Mon, 6 Feb 2017 16:04:25 +0000 (+0100) Subject: e2option: log the result of parse() X-Git-Tag: e2factory-2.3.17~25 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=8986380e3b2377b398ddbd1093bea154b2898fb5;p=e2factory.git e2option: log the result of parse() Signed-off-by: Tobias Ulmer --- 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