I have declared two LOG.i such as followings in my code:
Log.i("pen", pen.toString);
Log.i("book", book.toString);
Then I added these two filters to my Logcat window (via Edit Filter Configuration):
Filter1 with 'LOG TAG' set to pen Filter2 with 'LOG TAG' set to book
I have no problem to see them each individually (by selecting them each in drop-down filter in logcat window).
NOW What I need to know is HOW to display both filters at the same time?
Verbose: Show all log messages (the default). Debug: Show debug log messages that are useful during development only, as well as the message levels lower in this list. Info: Show expected log messages for regular usage, as well as the message levels lower in this list.
As soon as app considered 'chatty' by logcat (more than 5 lines per second), logs of your app will be collapsed. You can avoid this behaviour by whitelisting your app for logcat: adb logcat -P '<pid or uid of your app>'
Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.
Have you tried using regex? Do as the screenshot below and you should see both tags at the same time
For copy/paste: (pen|book)
Note this accepts any number of tags as long as you separate them with |
Thanks for all responses, they all were really helpful, however I found what I was looking for, if you really do not want to create a new filter just copy and paste something similar (pen|book) to the Search box on the main logcat window and do not forget to tick Regex box next to it.
Via the Edit filter configuration
, create or edit a filter with Log Tag(regex)
(or check regex depending on the version of android studio) set to
pen|book
I can not take a screenshot now, I'm sorry.
Otherwise using the command line you can do (on linux)
adb logcat | grep -e book -e pen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With