Summary

I have been having problems accessing the K9 log messages using aLogcat, see below for more details. What I would like to know is:

Why are no log messages from K9 appearing in the aLogcat log viewer?

Does anyone have any suggestions as to how I can see the full text of the errors which are occurring when trying to sync my K9 folders?

Could something have changed in Jelly Bean which lead K9's logging to stop working?

Since there seem to be remarkably few messages being shown by aLogcat in general, has something has changed in Jelly Bean which could mean that it is no longer able to access all messages?

Detail

I have recently been having connection problems with K9. My folders fail to sync and the folder list ends up full of socket errors (libcore.io.ErrnoException:) or ssl errors (javex.net.ssl.SSLException:) etc. where the last checked time should be. I get different messages depending on which problem is occurring at the time, but I can't see the full text of the error message, so it's difficult to guess what the cause might be.

Thinking that the log files might contain more information, I followed the instructions at Recording a debug log, enabled debug logging in K9, installed aLogcat and tried to look at the logs. Sadly, whichever log buffer I select (Main, Events or Radio), there appear to be no messages from K9.

If I add the suggested (k9|AndroidRuntime) regex filter then I see nothing in any of the logs. If I remove it then Main contains mostly garbage collection messages, Events seem to contain mostly messages from aLogcat itself and I haven't seen a log message in Radio yet.

If it makes any difference, I'm using a Nexus 7, but I would have thought that logging would have been to a standard location which wouldn't change between android versions.

2 Answers
2

Does anyone have any suggestions as to how I can see the full text of the errors which are occurring when trying to sync my K9 folders?

It seems that there is no way to see these log messages on the device without root access, but if you do have root access, there are a couple of options, either grant the required permissions to aLogcat or consider using a horrible hackTM to view them directly.

View the log files on your PC or workstation via adb

If you can connect your Android device to a PC or workstation, then you can access the logs via the adb command.

To do this on Windows, first you will need to install the Android SDK (which will require the Java SE SDK) and add the android-sdk\tools and android-sdk\platform-tools to the system path. Then enable USB debugging on your Nexus 7, plug it in via USB, and install the Android Composite ADB Interface from android-sdk\extras\google\usb_driver (I had to force Windows XP to look here, it wouldn't find the drivers on it's own).

Today I've tested my application on newest (api 16) emulator before releasing it to Google Play. It turned out that Android now refuses to grant this permission to 3rd party applications. This is weird because I've looked through all Jelly Bean's documented changes and couldn't find anything that mentions READ_LOGS permission.

IIRC adb logcat is still able to get the full android log on Jelly Bean.
–
FlowSep 6 '12 at 9:32

It does not require root but you need to enable adb on your device (usually under developer options).
–
FlowSep 6 '12 at 10:16

@Flow - I've now confirmed that I can view the log on my PC using adb logcat from there and have updated my answer accordingly. It's still frustrating that I can't find any way to access the logs without root access from the device itself.
–
Mark BoothSep 9 '12 at 1:35

It is the whole point in the JB log change that a non-root user can't access the full system log.
–
FlowDec 30 '12 at 13:25

@Flow - Yeah, and the whole point of log messages is that you can use them to find out what's going on. JB makes an app like aLogcat pretty pointless, since it can now only access log messages it has created itself!
–
Mark BoothDec 31 '12 at 19:12

I've seen this behaviour in K9 when my mail server updated it's SSL certificates. The fix was to long-press the account, select Account settings -> Fetching mail -> Incoming server and just hit Next through the pages to confirm your settings until you get the popup about the certificate (this might not appear if everything is OK with the certificate, mine had a wrong vhost). Confirm the certificate and just go through the rest of the settings and you account should start to work.

@MarkBooth Perhaps you should have asked that, we generally prefer questions that don't presuppose a solution.
–
Matthew Read♦Aug 28 '12 at 17:42

@MatthewRead I must agree with Mark here: The 4 items in his summary explicitly state he wants help with the logging issue, and I also do not see the "XY problem" here (presupposed solution). K9 is clearly just the example -- but maybe the question title should be adjusted to underline it: "Using logcat to determine the cause of problems" would match (and focus) better ;)
–
IzzySep 5 '12 at 15:27

Should I delete my answer, since it's completely off-topic after the edits and prone to be downvoted?
–
onik♦Sep 6 '12 at 11:25

It's up to you onik. As I said originally I do appreciate you taking the time to post an answer, but now that I've updated the question your answer looks even more out of place. I suppose you could always wait and see if it gets voted below -3 so you can collect your peer pressure badge. *8')
–
Mark BoothSep 6 '12 at 12:28