diff --git a/interfaces/kits/napi/src/napi_bluetooth_host_observer.cpp b/interfaces/kits/napi/src/napi_bluetooth_host_observer.cpp index b506c2536a2a91bf51606fffe84bafff867d5971..ba26b78e37dbe12034d9ad66537b95335dab6beb 100644 --- a/interfaces/kits/napi/src/napi_bluetooth_host_observer.cpp +++ b/interfaces/kits/napi/src/napi_bluetooth_host_observer.cpp @@ -242,7 +242,7 @@ void NapiBluetoothHostObserver::OnDeviceNameChanged(const std::string &deviceNam void NapiBluetoothHostObserver::OnDeviceAddrChanged(const std::string &address) { - HILOGI("NapiBluetoothHostObserver::OnDeviceAddrChanged called, address is %{public}s", address.c_str()); + HILOGI("address is %{public}s", GetEncryptAddr(address).c_str()); } void NapiBluetoothHostObserver::DealStateChange(const int transport, const int status, BluetoothState &state) @@ -433,4 +433,4 @@ void NapiBluetoothHostObserver::OnPairConfirmedCallBack(const std::string &devic } } } // namespace Bluetooth -} // namespace OHOS \ No newline at end of file +} // namespace OHOS diff --git a/services/bluetooth_standard/service/src/ble/ble_adapter.cpp b/services/bluetooth_standard/service/src/ble/ble_adapter.cpp index f880fb1572fccde730816ed07dbb9a391bf011a0..91897c9081538ff33bf883d88d19cf0fc75c19ff 100644 --- a/services/bluetooth_standard/service/src/ble/ble_adapter.cpp +++ b/services/bluetooth_standard/service/src/ble/ble_adapter.cpp @@ -32,6 +32,7 @@ #include "interface_profile_gatt_client.h" #include "interface_profile_manager.h" #include "log.h" +#include "log_util.h" #include "securec.h" namespace bluetooth { @@ -371,7 +372,7 @@ int BleAdapter::DeregisterAllCallback() const void BleAdapter::GenResPriAddrResult(uint8_t result, const uint8_t addr[BT_ADDRESS_SIZE], void *context) { - LOG_DEBUG("[BleAdapter] %{public}s:ResPriAddr = %{public}s", __func__, RawAddress::ConvertToString(addr).GetAddress().c_str()); + LOG_DEBUG("[BleAdapter] %{public}s:ResPriAddr = %{public}s", __func__, GetEncryptAddr(RawAddress::ConvertToString(addr).GetAddress()).c_str()); auto *adapter = static_cast(context); std::unique_lock lock(adapter->pimpl->mutexRpa_); diff --git a/services/bluetooth_standard/service/src/classic/classic_adapter_properties.cpp b/services/bluetooth_standard/service/src/classic/classic_adapter_properties.cpp index 5dd45feddc32b9f12d0bc5a691f145b8488dc4ce..b7d33ea3954cc77ec31614ec50e348943bf7467d 100644 --- a/services/bluetooth_standard/service/src/classic/classic_adapter_properties.cpp +++ b/services/bluetooth_standard/service/src/classic/classic_adapter_properties.cpp @@ -272,7 +272,7 @@ bool ClassicAdapterProperties::ReadAddrFromController() return ret; } macAddr_ = RawAddress::ConvertToString(btAddr.addr).GetAddress(); - LOG_DEBUG("ClassicAdapterProperties::GAPIF_GetLocalAddr %{public}s", macAddr_.c_str()); + LOG_DEBUG("ClassicAdapterProperties::GAPIF_GetLocalAddr %{public}s", GetEncryptAddr(macAddr_).c_str()); return ret; } @@ -550,4 +550,4 @@ bool ClassicAdapterProperties::SaveSupportUuids(const std::vector &uuids) return ret; } -} // namespace bluetooth \ No newline at end of file +} // namespace bluetooth