Merge pull request #41 from emersion/log-utf8

Avoid printing binary in logs
This commit is contained in:
Philipp C. Heckel 2022-10-08 07:58:39 -04:00 committed by GitHub
commit 915ca3d045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ import io.heckel.ntfy.util.Log
*/
class Distributor(val context: Context) {
fun sendMessage(app: String, connectorToken: String, message: ByteArray) {
Log.d(TAG, "Sending MESSAGE to $app (token=$connectorToken): ${String(message)} (${message.size} bytes)}")
Log.d(TAG, "Sending MESSAGE to $app (token=$connectorToken): ${message.size} bytes")
val broadcastIntent = Intent()
broadcastIntent.`package` = app
broadcastIntent.action = ACTION_MESSAGE