当前位置:网站首页>When the label begins with "IMS", why does logcat not print the log?
When the label begins with "IMS", why does logcat not print the log?
2022-07-27 00:22:00 【Johnny2004】
When the label is “IMS" At the beginning , Why? Logcat Don't print logs ?
One 、 Problem description
Why? Logcat With IMS" At the beginning Logcat Don't print logs ?
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btnOne:
System.out.println("Button One log by sout");
Log.e("IMSfsadfasdfasdf", "log by Log.e()");
break;
case R.id.btnTwo:
System.out.println("Button Two log by sout");
Log.e("MService", "log by Log.e()");
break;
}
}
journal :
04-07 15:05:48.838 4363-4363/com.licheedev.myapplication I/System.out:
Button One log by sout 04-07 15:05:49.916
4363-4363/com.licheedev.myapplication I/System.out: Button Two log by
sout 04-07 15:05:49.916 4363-4363/com.licheedev.myapplication
E/MService: log by Log.e() 04-07 15:05:54.109
4363-4363/com.licheedev.myapplication I/System.out: Button Two log by
sout 04-07 15:05:54.109 4363-4363/com.licheedev.myapplication
E/MService: log by Log.e() 04-07 15:05:54.822
4363-4363/com.licheedev.myapplication I/System.out: Button One log by
sout 04-07 15:05:55.638 4363-4363/com.licheedev.myapplication
I/System.out: Button One log by sout
Two 、 analysis
Android This line of code in the logging mechanism of . This is in function __android_log_write(prio, tag, buf);
/* XXX: This needs to go! */
if (!strcmp(tag, "HTC_RIL") ||
!strncmp(tag, "RIL", 3) || /* Any log tag with "RIL" as the prefix */
!strncmp(tag, "IMS", 3) || /* Any log tag with "IMS" as the prefix */
!strcmp(tag, "AT") ||
!strcmp(tag, "GSM") ||
!strcmp(tag, "STK") ||
!strcmp(tag, "CDMA") ||
!strcmp(tag, "PHONE") ||
!strcmp(tag, "SMS")) {
log_id = LOG_ID_RADIO;
// Inform third party apps/ril/radio.. to use Rlog or RLOG
snprintf(tmp_tag, sizeof(tmp_tag), "use-Rlog/RLOG-%s", tag);
tag = tmp_tag;
}
Function determines the legitimacy of the incoming parameter , After processing , Package and pass the parameters to the structure iovec, At the same time bugID, And packed iovec Pass as parameter to write_to_log.
Pay a little attention , If tag contain HTC_RIL, RIL, IMS, AT, GSM, STK, CDMA, PHONE, SMS, ( These are all related to radio), will bugID Set to LOG_ID_RADIO. Assign different types to different buffers .
3、 ... and 、 terms of settlement :
Method 1 :
app Change printing in log Of TAG, Avoid these characters :HTC_RIL, RIL, IMS, AT, GSM, STK, CDMA, PHONE, SMS
Method 2 :
Use radio log You can see the corresponding log:
Grab Android RIL layer log, In the debug Android Communication code , This Log It's critical . The grab command is as follows :
adb logcat -b radio >e://radio.log
边栏推荐
- Fourier analysis (basic introduction)
- Apple TV HD with the first generation Siri remote is listed as obsolete
- 蒙着头配置deeplabcut 1
- Codeforces E. maximum subsequence value (greed + pigeon nest principle)
- 20220720折腾deeplabcut2
- 13_集成学习和随机森林(Ensemble Learning and Random Forests)
- Anaconda => PyCharm => CUDA => cudnn => PyTorch 环境配置
- 9_逻辑回归(Logistic Regression)
- 滑动窗口问题总结
- Typesript generic constraint
猜你喜欢

Course notes of Professor Dalin of robotics platform

4. Talk about the famous Zhang Zhengyou calibration method

Leetcode - hash table

Tencent cloud lightweight application server purchase method steps!

Deeplabcut uses 1

Uni app learning (II)

Knowledge distillation -- pytorch implementation

第3章 跨域问题

LeetCode——链表篇

Anaconda => PyCharm => CUDA => cudnn => PyTorch 环境配置
随机推荐
Identity server4 authorization successful page Jump encountered an error: exception: correlation failed Solution of unknown location
Knowledge distillation -- pytorch implementation
About no module named'django.db.backends.mysql'
C and pointer Chapter 18 runtime environment 18.2 interface between C and assembly language
Method of setting QQ to blank ID
Paging plug-in -- PageHelper
第1章 拦截器入门及使用技巧
Mysql database complex operations: Database Constraints, query / connect table operations
The attorney general and the director of the national security service of Ukraine were dismissed
Codeforces B. Orac and Models (dp)
Practice of data storage scheme in distributed system
Drawing warehouse Tsai
View where Anaconda created the environment
Uni app learning (II)
Chapter 1 requirements analysis and SSM environment preparation
3 esp8266 nodemcu network server
第1章 开发第一个restful应用
查看 Anaconda 创建环境的位置
MySQL数据库复杂操作:数据库约束,查询/连接表操作
Tree and binary tree (learning notes)