10 Teach : Team Activity
Logging in Android
Objectives
Add some logging to to your project.
Overview
This week you'll use the Log class to log debug messages related to your project
Instructions
The following steps will guide you through this process.
Part I - Plan what you need to log and log it.
-
Brainstorm with your team the types of things you should be logging. Good candidates for logging include user authentication, anytime you have to catch an exception, whenever you decide to access an external resource, etc...
-
Write the code necessary to log those events.
It is up to you to decide what log levels and tag system you should use. The important thing isn't what levels and tags you choose, but that you are consistent with those choices throughout the application.
Part II - Use the logcat system in Android studio to view your logs.
-
Run your app, and if necessary cause something to happen which forces a log message to be written.
-
Use the logcat system to filter out all messages except the ones from your application.
Congratulations! You now know how to use logging in your Android Project.
Make sure to complete the accompanying quiz for this assignment on I-Learn.