3

My package name is getting in the way of me easily reading my logcat messages. I have to scroll way to the right to see anything. Each line is preceded with:

08-07 00:52:58.237 16332-16332/com.mycompay.mypackage.mypackage/System.out:

How can I get rid of the package name there? And what is the 16332-16332 doing there? Can I get rid of that too?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Mike Miller
  • 3,368
  • 5
  • 36
  • 49
  • You shouldn't be using System.out.println to debug in Android anyway – OneCricketeer Aug 07 '17 at 07:13
  • Errors print out there too, and it's quite annoying having to scroll so far to the right to read them. – Mike Miller Aug 07 '17 at 14:03
  • pretty much duplicate of https://stackoverflow.com/questions/37767350/remove-time-date-and-package-name-from-system-out-print-in-android-studio-logc – TT-- Sep 01 '18 at 18:13

3 Answers3

4

For Custom Logcat You should read Write and View Logs with Logcat

Every Android log message has a tag and a priority associated with it. The tag of a system log message is a short string indicating the system component from which the message originates .

The log message FORMAT is:

date time PID-TID/package priority/tag: message

PID stands for process identifier and TID is thread identifier; they can be the same if there’s only one thread.

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
  • 1
    Can this not be changed? I don't need to see the PID or the TID. I just want to see my logs (and errors) – Mike Miller Aug 07 '17 at 07:10
  • 5
    Thanks to your link I figured it out. Check out the section titled "Configuring the logcat Header Display." Just click the settings icon on the left side of logcat and deselect what you don't want, including the PID and TID. – Mike Miller Aug 07 '17 at 07:16
  • @MikeMiller Well . I will try this . – IntelliJ Amiya Aug 07 '17 at 07:17
  • @MikeMiller - Was totally not aware of the capablities of the settings icon in the logcat section. Never tried it but it does exactly what I want: remove the noise in the logcat lines whenever needed. – GeertVc Oct 18 '17 at 15:00
0

People love visual answers, so I'll duplicate the comment here. I believe it will help you understand this faster.

@Mike Miller: Check out the section titled "Configuring the logcat Header Display." Just click the settings icon on the left side of logcat

enter image description here

Shwarz Andrei
  • 647
  • 14
  • 17
0

For android studio electric eel and above. Use the following icon to edit the logcat - https://i.stack.imgur.com/L6KBg.png