user2989815
user2989815

Reputation: 79

Android. Alternative way for logging Application Output

I'm currently working on an App, which writes millions of lines to logcat (debugging output). I catch all these Informations (at runtime) by filtering the logoutput (of logcat) and write all the information in a file (redirect locat to a file). Unfortunately this takes very long and therefore the app runs very slow.

Now I wanted to ask, if there is a way, how i could get all these information faster. Is it faster, instead of writing the debugging information to logcat, to directly write the information to a textfile (on the device), or does anyone know a better way to gather these lines more efficient??!.

Thanks for reading, greetings B.

Upvotes: 5

Views: 4181

Answers (1)

Timo Bähr
Timo Bähr

Reputation: 2051

There exist multiple logging tools. I recommend having a look at Timber trees.

But please listen on Jake Wharton:

Every time you log in production, a puppy dies.

Here is a list of logger tools from awesome-android:

  • logger - Simple, pretty and powerful logger for android
  • timber - A logger with a small, extensible API which provides utility on top of Android's normal Log class.
  • LoggingInterceptor - An OkHttp interceptor which pretty logs request and response data.
  • Bugfender - Upload your logs and check them online, specially made for mobile
  • EzyLogger - Simple Lightweight logger
  • Logback Android - Logback port to Android which provides a highly configurable logging framework for Android apps.
  • Punt - cli tool that makes adb logcat better

Upvotes: 3

Related Questions