Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/189.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 了解adb logcat以及如何从示例中筛选_Android_React Native_Adb_React Native Android_Logcat - Fatal编程技术网

Android 了解adb logcat以及如何从示例中筛选

Android 了解adb logcat以及如何从示例中筛选,android,react-native,adb,react-native-android,logcat,Android,React Native,Adb,React Native Android,Logcat,我正在使用Android的adb logcat进行本机开发。 这是adb logcat输出的示例: 03-19 16:47:01.168 14818 15029 I ReactNativeJS: inside f1 03-19 16:47:01.198 14818 15029 I ReactNativeJS: inside swe_rise_trans of index.js 03-19 16:47:01.218 14818 15030 D THIS IS MY TAG: HELLO WORLD

我正在使用Android的adb logcat进行本机开发。 这是adb logcat输出的示例:

03-19 16:47:01.168 14818 15029 I ReactNativeJS: inside f1
03-19 16:47:01.198 14818 15029 I ReactNativeJS: inside swe_rise_trans of index.js
03-19 16:47:01.218 14818 15030 D THIS IS MY TAG: HELLO WORLD
03-19 16:47:01.398 14818 15029 I ReactNativeJS: 'temp', 2444663.426169321
03-19 16:47:01.508 14818 15029 I ReactNativeJS: 'julday_of_sunrise_before_birth', 2444663.426169321
前两列是日期和时间……第三列(14818)和第四列(15029)和第五列(有些是I,有些是D)怎么样

第六个是标签,是吗

我已尝试通过以下操作过滤此内容:

adb logcat -s "THIS IS MY TAG"
而不仅仅是
adb logcat
但当我使用上述代码进行过滤时,我只得到:

--------- beginning of main
--------- beginning of system
我想用“这是我的标签”和“ReactNativeJS”来显示所有输出,因为其余的只是不必要的噪音……下面是我得到的完整adb日志:

03-19 16:47:00.748  1334  1334 D StatusBar.NetworkController: refreshNwBoosterIndicator - setNWBoosterIndicators(false)
03-19 16:47:00.748  1334  1334 D StatusBar.NetworkController: refreshNwBoosterIndicator - setNWBoosterIndicators(false)
03-19 16:47:00.748  1334  1334 D StatusBar.NetworkController: refreshNwBoosterIndicator - setNWBoosterIndicators(false)
03-19 16:47:00.748  1334  1334 D StatusBar.NetworkController: refreshNwBoosterIndicator - setNWBoosterIndicators(false)
03-19 16:47:00.908 14818 15029 I ReactNativeJS: 'julday', 2444664.3090046295
03-19 16:47:00.968 14818 15029 I ReactNativeJS: 'next', 2444664.3090046295
03-19 16:47:01.058   340   810 V audio_hw_primary: out_standby: enter: usecase(1: low-latency-playback)
03-19 16:47:01.108   340   810 V audio_hw_primary: stop_output_stream: enter: usecase(1: low-latency-playback)
03-19 16:47:01.108   340   810 V audio_hw_primary: disable_audio_route: enter: usecase(1)
03-19 16:47:01.108   340   810 V audio_hw_primary: disable_audio_route: reset mixer path: low-latency-playback
03-19 16:47:01.108   340   810 D audio_route: ++++ audio_route_update_mixer ==============
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia5
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: value: 0
03-19 16:47:01.108   340   810 D audio_route: ------ audio_route_update_mixer ==============
03-19 16:47:01.108   340   810 V audio_hw_primary: disable_audio_route: exit
03-19 16:47:01.108   340   810 V audio_hw_primary: disable_snd_device: snd_device(2: speaker)
03-19 16:47:01.108   340   810 D audio_route: ++++ audio_route_update_mixer ==============
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: SPK DRV Volume
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: value: 0
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: RX7 Digital Volume
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: value: 0
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: COMP0 Switch
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: value: 0
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: RX7 MIX1 INP1, value: 0
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: DAC1 Switch
03-19 16:47:01.108   340   810 D audio_route: Setting mixer control: value: 0
03-19 16:47:01.108   340   810 D audio_route: ------ audio_route_update_mixer ==============
03-19 16:47:01.108   340   810 V audio_hw_primary: stop_output_stream: exit: status(0)
03-19 16:47:01.108   340   810 V audio_hw_primary: out_standby: exit
03-19 16:47:01.168 14818 15029 I ReactNativeJS: inside f1
03-19 16:47:01.198 14818 15029 I ReactNativeJS: inside swe_rise_trans of index.js
03-19 16:47:01.218 14818 15030 D THIS IS MY TAG: HELLO WORLD
03-19 16:47:01.398 14818 15029 I ReactNativeJS: 'temp', 2444663.426169321
03-19 16:47:01.508 14818 15029 I ReactNativeJS: 'julday_of_sunrise_before_birth', 2444663.426169321

这就是我发现的。。。。 如果将标记更改为不带空格的标记,如“MYTAG”而不是“THIS IS MY tag”,则可以执行以下命令,它将仅显示本机消息和“MYTAG”消息:

adb logcat *:S ReactNative:V ReactNativeJS:V MYTAG
以下是我这方面的示例输出:

03-19 17:22:42.518 27224 27482 D MYTAG   : HELLO WORLD
03-19 17:22:42.798 27224 27481 I ReactNativeJS: 'temp', 2444663.426169321
03-19 17:22:42.908 27224 27481 I ReactNativeJS: 'julday_of_sunrise_before_birth', 2444663.426169321
如果标签名之间有空格,那么我不太确定怎么做……也许有人知道怎么做