-1

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.

Aniruddh Parihar
  • 3,072
  • 3
  • 21
  • 39
CodingFox
  • 43
  • 9

2 Answers2

2

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.

Samudra Ganguly
  • 637
  • 4
  • 24
  • 1
    Create a `private static final String TAG = "MyApp/"` at the top of each class, appending a short name for the class. Then filter Logcat with MyApp and you'll be able to quickly and easily see all of your debug/error information. – codebod Jun 14 '20 at 18:31
0

I found an answer i can make this log.d("[Error]", "ERROR: " + e.toString());

CodingFox
  • 43
  • 9