0

I have a live application in the market. I want to add to it an option for my users to report bugs, and attach the relevant logcat output from around the time of that event.

I tried saving the last X lines of logcat in a collection, rolling files every X hours and zipping them when user reports a bug.

This approach works well on crashes using UncaughtExceptionHandler, but has a few problems.

  • If something is entering an infinite loop, many log lines are written and eventually disappear from my collection since its size is limited
  • If app is cleared by the OS, the intermediate log lines are lost.
  • These 2 often come together. When the app starts misbehaving in the background, the OS will eventually get rid of it.

Are there any standard solutions or methodologies for that?

EDIT1:

Since there are already a couple of answers suggesting tools like Crashlytics or Flurry, I'll clarify the problem. Crashes are the easy part of error reporting. But sometimes users see problems that are not related to crashes, just things not working properly. I have a settings option for them to report issues, but I want a way for them to also attach logcat output from around this time so I have a better clue about what made my app do what it did.

amitfr
  • 1,033
  • 1
  • 9
  • 29
  • From what I've read it's difficult or impossible to read logcat from your app. I think you're better off logging messages yourself to a cloud database such as firebase. – nasch Aug 17 '16 at 12:48

2 Answers2

0

Please use fabric to save all log and all creases catches

Integrate fabric on your application its a best way to catch all crashes

https://get.fabric.io/

Riyaz Parasara
  • 154
  • 8
  • 20
0

You can use the Crashlytics from the Fabric.

https://try.crashlytics.com/

You add the app in there and receive an email for all the crashes, you can also see everything on the dashboard. Great application.

Emilio Hoffmann
  • 274
  • 2
  • 11
  • I found this other question (http://stackoverflow.com/questions/2852181/send-logcat-output-of-an-app-to-an-emailadress) – Emilio Hoffmann Aug 16 '16 at 12:15
  • It says that you could use http://www.acra.ch/... "Acra catches exceptions, retrieves lots of context data and send them to the backend of your choice." – Emilio Hoffmann Aug 16 '16 at 12:16