问题
I ran Logcat on a command window and tried all possible formats:
I could not find in any of those formats how does Eclipse ADT's Logcat figure out what is the name of the Application issuing the message.
If you use Eclipse, look at the LogCat tab, it has Time, PID, Application, Tag and Text columns.
Does it use the TID to identify the application? Where can I get the list of TIDs and app names running in the system?
回答1:
i had about the same question on: https://stackoverflow.com/questions/10366709/android-using-logcat-in-the-command-line-application-info-exact-priority-f
i'm not sure how it works on eclipse , but you can have a workaround: take from the log which process id was started that matches the package name . the weird thing is that this might be the same way it works there , since for some log messages , eclipse doesn't show which application has written the log message. you might also be able to fetch the package name by pid , but i can't find out the method to do this.
来源:https://stackoverflow.com/questions/10565001/android-eclipse-logcat-messages-how-does-adt-get-the-application-column