Skip to content
Snippets Groups Projects
Commit e18a07b3 authored by Georgiy Lebedev's avatar Georgiy Lebedev Committed by Nikita Pettik
Browse files

log: fix box_api_cfg_set_log_{level, format}

box_api_cfg_set_log_{level, format} are part of dynamic_cfg (see
box/lua/load_cfg.lua) and are expected to throw exceptions (see
reload_cfg ib.).

Needed for #6086
parent a945a198
No related branches found
No related tags found
No related merge requests found
......@@ -427,7 +427,7 @@ local function box_api_cfg_set_log_level()
local ok, msg = verify_option(log_key, v)
if not ok then
return false, msg
box.error(box.error.CFG, 'log_level', msg)
end
if type(v) == 'string' then
......@@ -435,7 +435,6 @@ local function box_api_cfg_set_log_level()
end
set_log_level(v, false)
return true
end
-- Set logging format from reloading box.cfg{}
......@@ -445,11 +444,10 @@ local function box_api_set_log_format()
local ok, msg = verify_option(log_key, v)
if not ok then
return false, msg
box.error(box.error.CFG, 'log_format', msg)
end
set_log_format(v, false)
return true
end
-- Reload dynamic options.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment