LogCat中没有显示TAG" SMS"TAG、LogCat、SMS、QUOT

2023-09-05 06:15:25 作者:人不犯二枉少年i

@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
}

为什么在logcat中的日志记录不工作的一些线在上面code ??

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

推荐答案

有一些标记,不要去默认的缓冲区,因为已经指出。

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

您可以通过指定要查看与-blogcat的选项,缓冲区查看。检查部分的查看替代日志缓冲区的使用L​​ogCat中来查看不同的缓冲区可用。例如,看到短信logcat的消息,与启动logcat的:

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