Skip to content

Commit

Permalink
Improve readability of app preference logging format
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Mar 21, 2023
1 parent fe4b735 commit 932a121
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/platform/Tizen/AppPreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ CHIP_ERROR GetData(const char * key, void * data, size_t dataSize, size_t * getD
}
::memcpy(data, decodedData.Get() + offset, copySize);

ChipLogDetail(DeviceLayer, "Get data [%s]: %u", key, static_cast<unsigned int>(copySize));
ChipLogDetail(DeviceLayer, "Get preference data: key=%s len=%u", key, static_cast<unsigned int>(copySize));
ChipLogByteSpan(DeviceLayer, ByteSpan(reinterpret_cast<uint8_t *>(data), copySize));

return CHIP_NO_ERROR;
Expand Down Expand Up @@ -114,7 +114,7 @@ CHIP_ERROR SaveData(const char * key, const void * data, size_t dataSize)
return CHIP_ERROR_INCORRECT_STATE;
}

ChipLogDetail(DeviceLayer, "Save data [%s]: %u", key, static_cast<unsigned int>(dataSize));
ChipLogDetail(DeviceLayer, "Save preference data: key=%s len=%u", key, static_cast<unsigned int>(dataSize));
ChipLogByteSpan(DeviceLayer, ByteSpan(reinterpret_cast<const uint8_t *>(data), dataSize));

return CHIP_NO_ERROR;
Expand All @@ -133,7 +133,7 @@ CHIP_ERROR RemoveData(const char * key)
return CHIP_ERROR_INCORRECT_STATE;
}

ChipLogProgress(DeviceLayer, "Remove data [%s]", key);
ChipLogProgress(DeviceLayer, "Remove preference data: key=%s", key);
return CHIP_NO_ERROR;
}

Expand Down
6 changes: 3 additions & 3 deletions src/platform/Tizen/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void BLEManagerImpl::ReadValueRequestedCb(const char * remoteAddress, int reques

VerifyOrReturn(__GetAttInfo(gattHandle, &uuid, &type) == BT_ERROR_NONE,
ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from GATT handle"));
ChipLogProgress(DeviceLayer, "Gatt read requested on %s: %s", __ConvertAttTypeToStr(type), StringOrNullMarker(uuid));
ChipLogProgress(DeviceLayer, "Gatt read requested on %s: uuid=%s", __ConvertAttTypeToStr(type), StringOrNullMarker(uuid));
g_free(uuid);

ret = bt_gatt_get_value(gattHandle, &value, &len);
Expand All @@ -208,8 +208,8 @@ void BLEManagerImpl::WriteValueRequestedCb(const char * remoteAddress, int reque

VerifyOrReturn(__GetAttInfo(gattHandle, &uuid, &type) == BT_ERROR_NONE,
ChipLogError(DeviceLayer, "Failed to fetch GATT Attribute from GATT handle"));
ChipLogProgress(DeviceLayer, "Gatt write requested on %s [len=%d]: %s", __ConvertAttTypeToStr(type), len,
StringOrNullMarker(uuid));
ChipLogProgress(DeviceLayer, "Gatt write requested on %s: uuid=%s len=%d", __ConvertAttTypeToStr(type),
StringOrNullMarker(uuid), len);
ChipLogByteSpan(DeviceLayer, ByteSpan(reinterpret_cast<const uint8_t *>(value), len));
g_free(uuid);

Expand Down

0 comments on commit 932a121

Please sign in to comment.