From 1db932df213c8980cf317299ae93c9aadeab7571 Mon Sep 17 00:00:00 2001 From: zmstone Date: Mon, 29 Apr 2024 09:33:43 +0200 Subject: [PATCH] chore(mgmt): PUT /configs?ignore_readonly=true, lower log to info level --- apps/emqx_conf/src/emqx_conf_cli.erl | 2 +- changes/ce/feat-12940.en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx_conf/src/emqx_conf_cli.erl b/apps/emqx_conf/src/emqx_conf_cli.erl index 7085eb897..f1909e59b 100644 --- a/apps/emqx_conf/src/emqx_conf_cli.erl +++ b/apps/emqx_conf/src/emqx_conf_cli.erl @@ -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), diff --git a/changes/ce/feat-12940.en.md b/changes/ce/feat-12940.en.md index 24bdcc4e2..77e626194 100644 --- a/changes/ce/feat-12940.en.md +++ b/changes/ce/feat-12940.en.md @@ -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).