Logcat no longer accepts empty tags

342 Views Asked by At

I couldn't figure out why my Logs weren't printing to the Logcat, until I added a tag. I'm lazy when it comes to logging and never added tags in the past. It's been a while since I've done android work, so I'm not sure how long its been this way. Why can I no longer do this, and is there a way to make it work again? I could just as easily make my own method to print logs, but I'm looking if there is a setting I can change to make it work the way it used to.

Log.i("", "This is how i like it"); //Doesn't work

Log.i("Pointless Tag", "This is not how i like it"); //Works
2

There are 2 best solutions below

0
Gabe Sechan On

Just add the same tag to everything (I use my name as mine). Not putting in a tag is ok for debug code, but it makes everything harder to parse for every other developer if one sneaks into release.

0
Paul On

The logs with empty tag are actually there, you can see them using adb logcat. But for some reason Android Studio strips log messages with empty tag. Looks like a bug in Android Studio.