2

I am currently writing a simple app to practice Android programming. The app has a UI to which EditText elements are added during runtime. It saves and restores their content in the life cycle methods.

However, recently the contents were not restored as intended. So I added Log.d() invocations to find out why. As the issue occurs rarely and not during debugging I want to get the logs from my device.

First, I assumed I could get a logfile that was created for my Application. But apparently the logs of all apps are stored in some buffer which you can read out with logcat.

That seems to give me an endless stream of all apps' logs. I want to get only my app's debug logs and only those with my self defined tag like when I debug my app in Android Studio:

Viewing Logs in Android Studio (Screenshot)

Can I somehow get the logs from my device and view them with the Android Studio logcat view?

Thanks in advance!

Community
  • 1
  • 1
Tobias Uhmann
  • 2,757
  • 2
  • 25
  • 35
  • Play app with cable pluged in first then unplug it and play with app.. again plug in back cable to your system you must see the previouse logs on android studio – Qadir Hussain Jun 24 '16 at 10:48
  • 1
    Possible duplicate of [Filter LogCat to get only the messages from My Application in Android?](http://stackoverflow.com/questions/6854127/filter-logcat-to-get-only-the-messages-from-my-application-in-android) – Robert Jun 24 '16 at 10:52
  • 1
    @QadirHussain That works! Thanks :) – Tobias Uhmann Jun 24 '16 at 10:55

1 Answers1

2

Play app with cable pluged in first then unplug it and play with app.. again plug in back cable to your system you must see the previouse logs on android studio

Qadir Hussain
  • 8,721
  • 13
  • 89
  • 124