Android: Make the application logs my registration entries only "only"

I plan to sign apk and release it (via Export Eclipse tool). Then upload it to the market. I know that debugging is set to false by default when it is signed, so this means that no logs will be written. At the same time, if I set the debugging to true and release apk, then I will get all the logs.

What really interests me is the last debug expression, which I only added. I am currently using the Log.i operator to add informational logs. Is there a way that my application only logs Info logs (i.e., only my logs). Mybe, if I turn off the log and have system.out.print?

The reason I do this is because I want to send the last 100 lines of the log when the crash happens, and I only care about my log entries.

Please help me thanks

+4
source share
3 answers

I believe that you need to use ACRA built in to the filtering functions:

On the advanced use wiki page, you can see that you can set the logcat arguments in your configuration.

In your logging, mark your custom log messages with a specific tag and debug level, then in the logcat arguments, then set the parameter:

logcatArguments = { "-t", "100", "-v", "long", "ActivityManager:I", "MyApp:D", "*:S" } 

add one as

 "YourCustomTag:<YOUR_DEBUG_LEVEL>" 

and take out the ones you don’t want to register (perhaps MyApp: D in this case.)

+1
source

You will have to put a wrapper on top of the Journal, where you can set the functionality for managing journal levels.

+1
source

This type of function is already implemented by the Android ACRA library. The library detects crashes and sends crash information either to the Google Docs spreadsheet or to your own destination. You can add additional information, such as the last 100 lines of your journal, using the method shown here .

+1
source

All Articles