cketti edited this page Sep 3, 2015 · 20 revisions

Recording a debug log


K-9 Mail has controllable debug logging. Users can activate logging to help diagnosing problems and errors.


Step 1: Activate Debug Logging in K-9 Mail

At the accounts screen of K-9 Mail press the menu button, then choose "Settings". Under the heading "Debugging" check the "Enable debug logging" checkbox. Hit the back button twice to save the changes.

If K-9 is crashing, don't worry about about enabling debug logs.

Step 2: Trigger error

Do whatever causes the problem/error.

Step 3: Get Debug Log

To fetch the debug log you can either attach the device to your PC and use the tool adb from the Android SDK or you can use the application aLogcat to display the debug log on the device.

  • Using adb

    1. Follow these instructions to install adb and to connect your device.
    2. To capture the debug log in a file named k9-log.txt, enter the command:

         adb logcat -d -v time k9:V '*:S' AndroidRuntime:E > k9-log.txt
  • Using aLogcat (from Google Play)

    1. Make sure your Android version is supported by aLogCat. The app WON'T work with Android 4.1 and newer. If you have root see here: CatLog.
    2. Install the application aLogcat via Google Play.
    3. In aLogcat press the menu button and select "Filter". Enter (k9|AndroidRuntime), check Apply as a regular expression?, and press "Okay".
    4. Make sure that "Level" is set to "Verbose" (default setting). It's also usually useful to set "Format" to "Time" if logging something that happens over time instead of at some particular moment.

Step 4: Create an Issue in our Bug Tracker

To be able to fix your problem we need to know about it. Please create a new issue in our bug tracker. Attach a copy of the debug log you just created.

It's ok to remove your password from the debug log. Other than that, please give us as much of the log as you possibly can.

Important: Include the exact version number of your installed K-9 Mail in the bug report. Read GetVersionNumber if you need help on finding out which version of K-9 you're running.