Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set logging identifier #160

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Conversation

twyatt
Copy link
Member

@twyatt twyatt commented Sep 9, 2021

Example of setting logging identifier to "Example":

OS X
...
2021-09-09 02:22:48.788 sensortag.kexe[42195:875213] V/Kable: Example Configuring characteristic observations
2021-09-09 02:22:48.788 sensortag.kexe[42195:875213] I/Kable: Example Connected
2021-09-09 02:22:48.789 sensortag.kexe[42195:875213] D/Kable: Example CentralManager.notify
  service: f000aa80-0451-4000-b000-000000000000
  characteristic: f000aa81-0451-4000-b000-000000000000
[I/Unknown] Connected
[V/Unknown] Writing gyro period
[I/Unknown] movement → writePeriod → data = 255 (FF)
2021-09-09 02:22:48.790 sensortag.kexe[42195:875213] D/Kable: Example write
  service: f000aa80-0451-4000-b000-000000000000
  characteristic: f000aa83-0451-4000-b000-000000000000
  writeType: WithoutResponse
  data: FF
...
2021-09-09 02:22:49.147 sensortag.kexe[42195:875235] D/Kable/Delegate: Example 7BA26113-69FC-4087-90FE-6E02F9C46B20 didUpdateValueForCharacteristic
  service: F000AA80-0451-4000-B000-000000000000
  characteristic: F000AA81-0451-4000-B000-000000000000
  data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[I/Unknown] Vector3f(x=0.0, y=0.0, z=0.0)
2021-09-09 02:22:51.713 sensortag.kexe[42195:875236] D/Kable/Delegate: Example 7BA26113-69FC-4087-90FE-6E02F9C46B20 didUpdateValueForCharacteristic
  service: F000AA80-0451-4000-B000-000000000000
  characteristic: F000AA81-0451-4000-B000-000000000000
[I/Unknown] Vector3f(x=9.20105, y=249.99237, z=-29.083252)
  data: B6 04 FF 7F 1C F1 A0 07 84 FF A4 27 00 00 00 00 00 00
Android
2021-09-09 02:30:52.382 19943-19943/com.juul.sensortag V/Kable/Peripheral: Example discoverServices
2021-09-09 02:30:52.384 19943-20022/com.juul.sensortag D/BluetoothGatt: discoverServices() - device: 54:6C:0E:53:01:7D
2021-09-09 02:30:52.389 19943-19943/com.juul.sensortag I/System.out: [D/SensorViewModel$connect] connect
2021-09-09 02:30:52.827 19943-20002/com.juul.sensortag D/BluetoothGatt: onConnectionUpdated() - Device=54:6C:0E:53:01:7D interval=6 latency=0 timeout=500 status=0
2021-09-09 02:30:54.520 19943-20002/com.juul.sensortag D/BluetoothGatt: onSearchComplete() = Device=54:6C:0E:53:01:7D Status=0
2021-09-09 02:30:54.523 19943-20022/com.juul.sensortag D/Kable/Callback: Example onServicesDiscovered
    status: GATT_SUCCESS(0)
2021-09-09 02:30:54.535 19943-19943/com.juul.sensortag V/Kable/Peripheral: Example Configuring characteristic observations
2021-09-09 02:30:54.535 19943-19943/com.juul.sensortag I/Kable/Peripheral: Example Connected
2021-09-09 02:30:54.546 19943-20022/com.juul.sensortag D/BluetoothGatt: readRssi() - device: 54:6C:0E:53:01:7D
2021-09-09 02:30:54.549 19943-19943/com.juul.sensortag D/Kable/Peripheral: Example setCharacteristicNotification
    service: f000aa80-0451-4000-b000-000000000000
    characteristic: f000aa81-0451-4000-b000-000000000000
    value: true
2021-09-09 02:30:54.550 19943-19943/com.juul.sensortag D/BluetoothGatt: setCharacteristicNotification() - uuid: f000aa81-0451-4000-b000-000000000000 enable: true
2021-09-09 02:30:54.552 19943-19943/com.juul.sensortag V/Kable/Peripheral: Example Writing ENABLE_NOTIFICATION_VALUE to CCCD
    service: f000aa80-0451-4000-b000-000000000000
    characteristic: f000aa81-0451-4000-b000-000000000000
    descriptor: 00002902-0000-1000-8000-00805f9b34fb
2021-09-09 02:30:54.553 19943-19943/com.juul.sensortag D/Kable/Peripheral: Example write
    service: f000aa80-0451-4000-b000-000000000000
    characteristic: f000aa81-0451-4000-b000-000000000000
    descriptor: 00002902-0000-1000-8000-00805f9b34fb
    data: 01 00
2021-09-09 02:30:54.557 19943-20022/com.juul.sensortag D/Kable/Callback: Example onReadRemoteRssi
    rssi: -60
    status: GATT_SUCCESS(0)
2021-09-09 02:30:54.558 19943-19943/com.juul.sensortag I/System.out: [I/SensorTag] Enabling gyro
2021-09-09 02:30:54.558 19943-19943/com.juul.sensortag D/Kable/Peripheral: Example write
    service: f000aa80-0451-4000-b000-000000000000
    characteristic: f000aa82-0451-4000-b000-000000000000
    writeType: WithoutResponse
    data: 7F 00
2021-09-09 02:30:54.560 19943-19943/com.juul.sensortag I/System.out: [I/SensorTag] Enabling gyro
2021-09-09 02:30:54.560 19943-19943/com.juul.sensortag D/Kable/Peripheral: Example write
    service: f000aa80-0451-4000-b000-000000000000
    characteristic: f000aa82-0451-4000-b000-000000000000
    writeType: WithoutResponse
    data: 7F 00
JavaScript

Screen Shot 2021-09-09 at 2 32 40 AM

@twyatt twyatt force-pushed the twyatt/logging/identifier branch from 3dde5ce to 6e1a7a4 Compare September 9, 2021 09:11
@twyatt twyatt marked this pull request as ready for review September 9, 2021 09:33
@twyatt twyatt requested review from a team, QuantumRand and cedrickcooke September 9, 2021 09:33
core/src/androidMain/kotlin/Scanner.kt Outdated Show resolved Hide resolved
@twyatt twyatt requested a review from davertay-j September 9, 2021 21:30
@twyatt twyatt enabled auto-merge (squash) September 10, 2021 05:17
@twyatt twyatt merged commit 6b4ca38 into main Sep 10, 2021
@twyatt twyatt deleted the twyatt/logging/identifier branch September 10, 2021 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants