refactor(kafka_consumer): redact error info

This commit is contained in:
Thales Macedo Garitezi 2023-03-08 09:35:17 -03:00
parent 9037314aea
commit 2a3aef92bb
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ on_start(InstanceId, Config) ->
msg => "failed_to_start_kafka_consumer_client", msg => "failed_to_start_kafka_consumer_client",
instance_id => InstanceId, instance_id => InstanceId,
kafka_hosts => BootstrapHosts, kafka_hosts => BootstrapHosts,
reason => Reason reason => emqx_misc:redact(Reason)
}), }),
throw(failed_to_start_kafka_client) throw(failed_to_start_kafka_client)
end, end,
@ -312,7 +312,7 @@ start_subscriber(Config, InstanceId, ClientID) ->
instance_id => InstanceId, instance_id => InstanceId,
kafka_hosts => emqx_bridge_impl_kafka:hosts(BootstrapHosts0), kafka_hosts => emqx_bridge_impl_kafka:hosts(BootstrapHosts0),
kafka_topic => KafkaTopic, kafka_topic => KafkaTopic,
reason => Reason2 reason => emqx_misc:redact(Reason2)
}), }),
stop_client(ClientID), stop_client(ClientID),
throw(failed_to_start_kafka_consumer) throw(failed_to_start_kafka_consumer)