Recently, I'm developing a android application. I've got a lot of Log.i
or Log.e
in my code.
When I test the app on my phone, which is connected to my computer via USB, I can get all the logs under the Logcat. But when my phone not connecting to my computer, I got no idea where the bug comes from because Log.*
doesn't write logs to file.
Could anyone give my some suggestions on how to redirect the Log.*
to a file with minimal change to my code? Thanks a lot!
p.s.
I've searched about how to redirect Logcat to file using adb logcat
. Could anyone tell me how to filter the logs which are corresponding to my current app?