From 9f9b3d26d1030f91aa8bfcb84aa745f4f1a0f2a3 Mon Sep 17 00:00:00 2001 From: Guogang Li Date: Fri, 16 Sep 2022 14:07:48 -0700 Subject: [PATCH] Fixed the log issue for advertisement data PiperOrigin-RevId: 474897767 --- .../implementation/windows/ble_medium.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/platform/implementation/windows/ble_medium.cc b/internal/platform/implementation/windows/ble_medium.cc index a011d3c3..5aa54356 100644 --- a/internal/platform/implementation/windows/ble_medium.cc +++ b/internal/platform/implementation/windows/ble_medium.cc @@ -138,13 +138,13 @@ bool BleMedium::StartAdvertising( return false; } - NEARBY_LOGS(INFO) << "Windows Ble StartAdvertising: service_id=" - << service_id << ", advertisement bytes= 0x" - << absl::BytesToHexString(advertisement_bytes.data()) - << "(" << advertisement_bytes.size() << ")," - << " fast advertisement service uuid= 0x" - << absl::BytesToHexString( - fast_advertisement_service_uuid); + NEARBY_LOGS(INFO) + << "Windows Ble StartAdvertising: service_id=" << service_id + << ", advertisement bytes= 0x" + << absl::BytesToHexString(advertisement_bytes.AsStringView()) << "(" + << advertisement_bytes.size() << ")," + << " fast advertisement service uuid= 0x" + << absl::BytesToHexString(fast_advertisement_service_uuid); if (is_publisher_started_) { NEARBY_LOGS(WARNING) @@ -562,7 +562,7 @@ void BleMedium::AdvertisementReceivedHandler( NEARBY_LOGS(VERBOSE) << "Nearby BLE Medium 0xFEF3 Advertisement discovered. " "0x16 Service data: advertisement bytes= 0x" - << absl::BytesToHexString(advertisement_data.data()) << "(" + << absl::BytesToHexString(advertisement_data.AsStringView()) << "(" << advertisement_data.size() << ")"; std::string peripheral_name =