If you’ve been programming for any length of time, you know that some (most?) of the time, things don’t go the way you expect. What do you do then? Luckily, the same techniques you use to diagnose problems on other platforms can be applied to Android. These include printing messages to the log and stepping through your program in a debugger.
The class provides several static methods to print messages of various severity levels to the Android system log:
Log.wtf: What a Terrible Failure
Users will never see the system log, but as a developer you can view it in a couple of ways. In Android Studio, the LogCat view is shown at ...