0

I did what the ACrA for android website saidin terms of sendig logcat information to mygoogle spredsheet. I was able to receive the log intended however I only get the last 10 lines instead of 150 that i specified. Is acra.supposed to send me 150 lines or is it supposed to look at 150 lines and filters out whatever I asked to be filtered and then send me the filtered version? I expect the first one so.any help is appreciated

Thank you

Snake
  • 14,228
  • 27
  • 117
  • 250
  • How do you ask ACRA to apply filters on the logcat ? – Kevin Gaudin Aug 16 '12 at 10:34
  • Adb logcat -t 100 -v long xx:I *:s where the I fitlter by showing Info bugs only with tag xx – Snake Aug 16 '12 at 20:16
  • Could you add your ACRA configuration code in your post ? And on what android version are you testing ? – Kevin Gaudin Aug 17 '12 at 06:10
  • Sorry for late answer. I appreciate your help logcatArguments = { "-t", "150", "-v", "long", "Rules:I", "*:S" }. I cmpiled it using 2.3 and testing on 4.0 device – Snake Aug 18 '12 at 21:48
  • 1
    Well, these parameters are transmitted to logcat. ACRA is not responsible of the filtering. For your information, starting with JellyBean, logcat will retrieve ONLY lines concerning your app. This is a new security policy. – Kevin Gaudin Aug 23 '12 at 07:24
  • Ah ok, well maybe it can be as improvement to ACRA (since you are co-founder) since most people still use 2.3.3. Have ACRA query logcat with the above parameters (without the number of lines so you get the whole log) and then only send 100 lines worth of filtered lines. – Snake Aug 23 '12 at 14:48
  • Yes, that could be easy to implement as I already had to emulate that -t parameters for older android versions where it was not available. Moreover, starting with the new 4.3 version, ACRA can also retrieve a separate log file. That could be interesting for you. – Kevin Gaudin Aug 23 '12 at 18:50
  • Thank you. Awesome, it can be helpful for sure. I will look into it. But please try to get this mini feature in if it is easy. That will be amazing if you can thanks a lot – Snake Aug 23 '12 at 23:49
  • Oh another question, does this new feature you mentoned ( about sending my own logs) require Logs Access permession. Many users have a problem with that – Snake Aug 24 '12 at 00:19
  • No, it just requires you to use another Logger than android.util.Log like this one: http://code.google.com/p/android-logging-log4j/ (I just googled it, never tested it). It would write logs in a file in your apps private filesystem. No need for any permission. – Kevin Gaudin Aug 24 '12 at 16:56

1 Answers1

1

As I explained in the comments:

  • ACRA forwards the logcat parameters settings directly to the LogCat command line, so logcat is responsible of the filtering
  • we could modify ACRA to take care of the filtering on the whole available logcat output. This is not implemented yet.
  • Starting with ACRA 4.3.0 (beta phase in progress until the 1st of sept. 2012) you can write your logs in your own file and configure it to send its content in your reports (with a configurable number of lines)
  • starting with JellyBean, the READ_LOGS permission is not granted to third party apps. Only system apps can use it. On the other hand, apps can call logcat and get only their own traces without any permission.
Kevin Gaudin
  • 9,927
  • 3
  • 32
  • 34
  • Thank you Kevin for your help in this. I greatly appreciate it – Snake Aug 24 '12 at 18:56
  • Kevin, the ACRA website does not show a how-To send my own report files instead of log cat. Is this info going to be added soon? Or can you simply tell me :) – Snake Sep 01 '12 at 23:48
  • 1
    The Wiki has been updated: http://code.google.com/p/acra/wiki/AdvancedUsage#Adding_your_own_log_file_extracts_to_reports – Kevin Gaudin Sep 04 '12 at 04:45
  • I am using device with android version 4.1.1 and acra-4.5.0 but my all attempts to get the Logcat failed. It always comes empty. This is same as - http://stackoverflow.com/questions/14572385/logcat-empty-using-acra-on-device?rq=1 – sjain Apr 03 '14 at 14:41