0

I am using Android's adb logcat for my React Native development. This is a sample of what is outputted by 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

The first 2 columns are date and time....what about 3rd (14818) and 4th (15029) and 5th (I for some and D for some)??

The 6th is the Tag is it???

I have tried filtering this by doing:

adb logcat -s "THIS IS MY TAG"

instead of just adb logcat but when I filter with the above code I only get:

--------- beginning of main
--------- beginning of system

I would like to show all ouput with "THIS IS MY TAG" and "ReactNativeJS" only since the rest are just unnecessary noises....below is the complete adb logcat I had:

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
preston
  • 3,721
  • 6
  • 46
  • 78

1 Answers1

1

This is what I've figured out.... If you change your tag into a tag without spaces like "MYTAG" instead of "THIS IS MY TAG" then you can do the following command and it will only show the ReactNative messages and "MYTAG" messages:

adb logcat *:S ReactNative:V ReactNativeJS:V MYTAG

here is the example output from my end:

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

If it is a Tag name that has spaces in between then I'm not too sure how to do it...maybe someone who knows can share how to do that?

preston
  • 3,721
  • 6
  • 46
  • 78