Android Eclipse Logcat messages: How does ADT get the Application column?

梦想的初衷 提交于 2019-12-06 13:12:14

问题


I ran Logcat on a command window and tried all possible formats:

  • brief — Display priority/tag and PID of the process issuing the message (the default format).
  • process — Display PID only.
  • tag — Display the priority/tag only.
  • raw — Display the raw log message, with no other metadata fields.
  • time — Display the date, invocation time, priority/tag, and PID of the process.
  • thread — Display the priority, tag, and the PID and TID.
  • threadtime — Display the date, invocation time, priority, tag, and the PID and TID.
  • long — Display all metadata fields and separate messages with blank lines.

    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

  • 易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!