What do these numbers mean in the Android trap?

10-21 10:37:32.821 18142-18297/com.myapp.debug D/[111] SqLiteHelper insertArrayList﹕ Start 10-21 10:37:33.422 18142-18291/com.myapp.debug D/[128] SqLiteHelper insertArrayList﹕ Finish 10-21 10:37:33.452 18142-18142/com.myapp.debug D/[89] Screen1 onPause﹕ SQLite db closing 

These are typical lines from my Android application log.

  • Time (October 21, 10:37)
  • Mysterious numbers separated by dashes.
  • application package (com.myapp.debug)
  • Log Type (Debug)
  • Title (lineNum, activity and method)
  • Body

So, are these mysterious numbers the identifiers of the threads? user identifiers? Process identifiers? Why do they sometimes change? Why are there two of them that are sometimes the same?

Update: calling the function "Log.d (Header, Body)". Using Android Studio.

+6
source share
2 answers

Most likely, a number, for example 18142-18297 , refers to the process identifier (in this case 18142 ) and the thread identifier ( 18297 ).

Edit

The main thread has a process identifier. In your case, 18142 has the id of the main thread and other identifiers, such as: 18279 and 18291, refer to other threads created in your application. In the Thread window of the DDMS window DDMS you can see all the available threads in the application and their identifiers. In Eclipse, it will look like this: enter image description here

+6
source

I think it was very clear from the eclipse

enter image description here

To answer your question, refer to this link : Processes and Threads

+6
source

Source: https://habr.com/ru/post/977033/


All Articles