From e9f82c5abd05830dbec587f6c5c337549ecbd9e1 Mon Sep 17 00:00:00 2001 From: Marc Sallin Date: Tue, 17 Sep 2024 17:53:48 +0200 Subject: [PATCH] Update emqx_log_action.erl --- src/emqx_log_action.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/emqx_log_action.erl b/src/emqx_log_action.erl index 5ef6659..ef6af68 100644 --- a/src/emqx_log_action.erl +++ b/src/emqx_log_action.erl @@ -34,10 +34,16 @@ kvs_to_iolist(KVs) -> ", ", lists:map( fun({K, V}) -> [to_iolist(K), ": ", to_iolist(V)] end, - KVs + filter_undefined(KVs) ) ). +filter_undefined(KVs) -> + lists:filter( + fun({_, V}) -> V =/= undefined end, + KVs + ). + try_format_unicode(undefined) -> "undefined"; try_format_unicode(Char) ->