Skip to content
Advertisement

What is TAG in log.d(TAG, message)?

I want to log a Catch exception in the log cat but i don’t know the tags of log.d. Can someone help me? in all examples is see this log.d(TAG, message) but I don’t know what goes in this TAG, please help me.

I tried this for example log.d(Error, "Error: " + e) but it didn’t work. I searched on google for example log.d Tags or log.d Tags and more.

Advertisement

Answer

In TAG, you can pass anything. You can filter the logcat easily using TAG value. In other words, it is used to group different errors under the same tag.

Advertisement