chore(mgmt): PUT /configs?ignore_readonly=true, lower log to info level
This commit is contained in:
parent
c3d27347b0
commit
1db932df21
|
@ -415,7 +415,7 @@ check_keys_is_not_readonly(Conf, Opts) ->
|
|||
[] ->
|
||||
{ok, Conf};
|
||||
BadKeys when IgnoreReadonly ->
|
||||
?SLOG(warning, #{msg => "readonly_root_keys_ignored", keys => BadKeys}),
|
||||
?SLOG(info, #{msg => "readonly_root_keys_ignored", keys => BadKeys}),
|
||||
{ok, maps:without(BadKeys, Conf)};
|
||||
BadKeys ->
|
||||
BadKeysStr = lists:join(<<",">>, BadKeys),
|
||||
|
|
|
@ -6,7 +6,7 @@ included readonly root keys (`cluster`, `rpc`, and `node`).
|
|||
After this enhancement it can be called as `PUT /configs?ignore_readonly=true`,
|
||||
EMQX will in this case ignore readonly root config keys, and apply the rest.
|
||||
|
||||
A warning message is logged to warn that the readonly keys are dropped.
|
||||
For observability purposes, an info level message is logged if any readonly keys are dropped.
|
||||
|
||||
Also fixed an exception when config has bad HOCON syntax (returns 500).
|
||||
Now bad syntax will cause the API to return 400 (BAD_REQUEST).
|
||||
|
|
Loading…
Reference in New Issue