Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native, Android Log.

Tags:

Is there a way in react native to see the log from native (java) modules of android?

I'm using javas log module https://developer.android.com/reference/android/util/Log.html - but I'm not getting anything from there. and to be honest I'm not sure how to use it if it's at all possible. atm there isn't much code - it's just

    Log.d("Notification","Notify App"); 

Because I want to see if I can see the notifications somewhere - I do know the java module is registered correctly as I'm calling other functions from it.

Thanks!

like image 515
Nur Bar Avatar asked Sep 03 '16 18:09

Nur Bar


1 Answers

If you put Log.ds in your native code, you can access the logs with Android Device Monitor in android studio, or with this command on the terminal: adb -d logcat <your package name>:<log level> *:S

Make sure USB debugging is enabled in your phone.

like image 82
nabn Avatar answered Oct 23 '22 10:10

nabn