Replacing calls to `Exception#printStackTrace()` with Java logging.

This will keep output cleaner, especially in Android where logging and stdout are mixed.
I'm puzzled by this formatting; the file itself seems to have proper indentation.  Perhaps my local git configuration is to blame...