From the course: Android Studio Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Filter and search logcat messages

Filter and search logcat messages

- [Instructor] The Android SDK's log class lets you create and send messages from inside the application to help you trace what's going internally at runtime. These messages are received in the logcat window in Android Studio, and if you have a device connected to Android Studio through ADB, you may see a constant stream of messages being sent. When your app is sending its own messages, you want to be able to filter those messages. Now, I'm going to show you a very common pattern that a lot of Android developers use on Kotlin-based apps. First, I'll go to the project and I'll go to my base package here. Now I'm going to create a new Kotlin file and I'll name it constance. This will be a file, not a class. And within this, I'm going to create a constant with const_val. I'll give it a name of tag and I'll give it a string value of my app tag. Now, that string could be anything you like. The reason I'm naming this constant…

Contents