Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 00b00d13 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: dbus_macros: Call DBusArg::log to elements and revise {:?} usage

- In container types (Option, Vec, HashMap) call DBusArg::log to the
  elements so we can control how these elements would be printed.
- Avoid using Debug format "{:?}" in the containers and the toppest
  DBusLog::log, because that recursively produces many backslashes.
- Use |vertical bar| to separate different DBus args.
- Use Debug format "{:?}" for the base types (e.g. String) so it's
  easier to realize the type from the log.

Before this CL:
RegisterClient: "e060b902508c485f8b0e27639c7f2d41", "Box<dyn>", "false"
  * The first arg is a String, but we can't distinguish it
CreateInsecureRfcommSocketToServiceRecord: "8", "BluetoothDevice { address: \"xx:xx:xx:xx:8a:48\", name: \"\" }", "a384bd4f-41ea-3b02-8901-8c2ed9a79970"
  * The double quotes make it hard to know which chunk is a single arg
  * The third arg is a Uuid

VS after:
RegisterClient: |"e060b902508c485f8b0e27639c7f2d41"|, |Box<dyn>|, |false|
CreateInsecureRfcommSocketToServiceRecord: |8|, |BluetoothDevice { address: xx:xx:xx:xx:8a:48, name: "" }|, |a384bd4f-41ea-3b02-8901-8c2ed9a79970|

Bug: 342337056
Tag: #floss
Test: mmm packages/modules/Bluetooth
Test: manual Toggle BT, verify the log
Flag: EXEMPT, Floss-only changes
Change-Id: If7e0d65eebbaaa27e72e14ca1901c37a59fbdccf
parent cf57a820
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment