How can I remove my package name from Logcat?
Asked Answered
E

3

5

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?

Epimenides answered 7/8, 2017 at 6:59 Comment(3)
You shouldn't be using System.out.println to debug in Android anywayPandarus
Errors print out there too, and it's quite annoying having to scroll so far to the right to read them.Epimenides
pretty much duplicate of #37767850Doriandoric
G
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.

Gramineous answered 7/8, 2017 at 7:0 Comment(4)
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)Epimenides
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.Epimenides
@MikeMiller Well . I will try this .Gramineous
@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.Fawne
D
2

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

Desdee answered 23/1, 2023 at 14:55 Comment(0)
T
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

Typehigh answered 31/8, 2022 at 11:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.