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) ->