LogCat not displaying TAG “SMS”

徘徊边缘 提交于 2019-12-04 18:27:20

问题


@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Log.e("SMS","Hello World");   //not showing
    Log.v("SMS","Hello World");   //not showing
    Log.i("SMS","Hello World");   //not showing
    Log.d("SMS","Hello World");   //not showing

    Log.i("sms","Hello World");   //showing
}

Why the Logging in the Logcat is not working for some line in the above code??


回答1:


There are some tags that don't go to the default buffer, as has been stated.

You can view them by specifying which buffer to view with the "-b" logcat option. Check section Viewing Alternative Log Buffers of Using LogCat to view the different buffers available. For example, to see the "SMS" logcat messages, start logcat with:

adb logcat -b radio



回答2:


There is a separate buffer for all telephony related log messages, whichwon't appear in default LogCat window.



来源:https://stackoverflow.com/questions/8699756/logcat-not-displaying-tag-sms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!