Merge pull request #3004 from Philoul/Fix/log

Remove bytearray data from log
This commit is contained in:
Milos Kozak 2023-10-29 21:13:44 +01:00 committed by GitHub
commit 5d62ad1729
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -143,7 +143,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() {
}
rxDataPath -> {
aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${String(messageEvent.data)}")
aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${messageEvent.data.size}")
val command = EventData.deserializeByte(messageEvent.data)
rxBus.send(command.also { it.sourceNodeId = messageEvent.sourceNodeId })
}
@ -213,13 +213,13 @@ class DataLayerListenerServiceMobile : WearableListenerService() {
}
private fun sendMessage(path: String, data: ByteArray) {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}")
transcriptionNodeId?.also { nodeId ->
messageClient
.sendMessage(nodeId, path, data).apply {
addOnSuccessListener { }
addOnFailureListener {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}")
}
}
}

View file

@ -206,15 +206,15 @@ class DataLayerListenerServiceWear : WearableListenerService() {
} ?: aapsLogger.debug(LTag.WEAR, "sendMessage: Ignoring message. No node selected.")
}
@Suppress("unused")
private fun sendMessage(path: String, data: ByteArray) {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}")
transcriptionNodeId?.also { nodeId ->
messageClient
.sendMessage(nodeId, path, data).apply {
addOnSuccessListener { }
addOnFailureListener {
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure")
aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}")
}
}
}