Prechádzať zdrojové kódy

fix(logger): no need for special handling of empty string

when formating json logs, there is no need to handle empty strings
special, already covered by unicode handling
Zaiming (Stone) Shi 2 rokov pred
rodič
commit
c8cbbff044
1 zmenil súbory, kde vykonal 0 pridanie a 4 odobranie
  1. 0 4
      apps/emqx/src/emqx_logger_jsonfmt.erl

+ 0 - 4
apps/emqx/src/emqx_logger_jsonfmt.erl

@@ -224,10 +224,6 @@ best_effort_json_obj(Map, Config) ->
             do_format_msg("~p", [Map], Config)
             do_format_msg("~p", [Map], Config)
     end.
     end.
 
 
-json([], _) ->
-    "";
-json(<<"">>, _) ->
-    "\"\"";
 json(A, _) when is_atom(A) -> atom_to_binary(A, utf8);
 json(A, _) when is_atom(A) -> atom_to_binary(A, utf8);
 json(I, _) when is_integer(I) -> I;
 json(I, _) when is_integer(I) -> I;
 json(F, _) when is_float(F) -> F;
 json(F, _) when is_float(F) -> F;