小编Man*_*dia的帖子

android中的Log.d()或Log.e()打印出不需要的额外文本

看看图像以获得更多想法当我只是在Android应用程序中记录消息时,Android Monitor会打印太多额外的垃圾文本,例如:代码:

Log.d(TAG, "From: " + "34369257099");
Log.d(TAG, "Message Notification Body: " + "Hello");
Run Code Online (Sandbox Code Playgroud)

android监视器输出:

10-01 14:15:33.262 18193-23771/com.xxxxx.xxxxxx D/MyFirebaseMsgService: From: 34369257099
10-01 14:15:33.262 18193-23771/com.xxxxx.xxxxxx D/MyFirebaseMsgService: Message Notification Body: Hello

[ 10-01 14:15:33.490 19060:19060 E/         ]
[adb] handle_packet() t->online(1) p->msg.arg0(9871) p->msg.arg1(0) OPEN


[ 10-01 14:15:33.490 19060:19060 E/         ]
[adb] handle the adb command, and the command = adb shell:cat /proc/net/xt_qtaguid/stats | grep 10206

[ 10-01 14:15:33.527 19060:19060 E/         ]
[adb] cuurent command is A_CLSE 


[ 10-01 14:15:33.686 19060:19060 E/         ]
[adb] …
Run Code Online (Sandbox Code Playgroud)

logging android

11
推荐指数
1
解决办法
542
查看次数

标签 统计

android ×1

logging ×1