Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do these numbers in Android logcat mean?

Tags:

android

logcat

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 app log.

  1. Time (October 21 10:37 am)
  2. Mysterious numbers separated by a dash
  3. application package (com.myapp.debug)
  4. Log type (debug)
  5. Header (lineNum, Activity & Method)
  6. Body

So these mysterious numbers - are they thread IDs? user IDs? Process IDs? Why do they sometimes change? Why are there 2 of them that are sometimes the same?

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

like image 866
Scott Avatar asked Oct 21 '14 15:10

Scott


2 Answers

Most probably a number such as 18142-18297 refers to process identifier (in this case 18142) and thread identifier (18297).

Edit

The main thread seems to have the id of the process. In your case 18142 is the id of the main thread and other ids such as: 18279 and 18291 refer to other threads created within your application. In the Thread window of DDMS view you can see all available threads in your application and their ids. In Eclipse it would look like this: enter image description here

like image 151
eldjon Avatar answered Oct 01 '22 16:10

eldjon


I think from eclipse it was quite clear

enter image description here

For the answer to your question refer you to this link : Processes and Threads

like image 45
Cool Avatar answered Oct 01 '22 16:10

Cool