Explorar el Código

fix(resource): redact query args in exception log

Zaiming (Stone) Shi hace 2 años
padre
commit
c2d750aa09
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      apps/emqx_resource/src/emqx_resource_buffer_worker.erl

+ 1 - 1
apps/emqx_resource/src/emqx_resource_buffer_worker.erl

@@ -856,7 +856,7 @@ handle_query_result(Id, Result, HasBeenSent) ->
     {ack | nack, function(), counters()}.
 handle_query_result_pure(_Id, ?RESOURCE_ERROR_M(exception, Msg), _HasBeenSent) ->
     PostFn = fun() ->
-        ?SLOG(error, #{msg => "resource_exception", info => Msg}),
+        ?SLOG(error, #{msg => "resource_exception", info => emqx_utils:redact(Msg)}),
         ok
     end,
     {nack, PostFn, #{}};