tags:

views:

249

answers:

3
+2  Q: 

NSLog 10b meaning?

Whenever I use NSLog(), it always shows this mysterious "10b" next to the process ID. I know that this is tied somehow to the thread where the NSLog() call was made, but what exactly does it mean? When I try NSLog() from a different thread in the same process, I will get values like 1003, 1103, and 1403. Here is the "Hello, World!" output or NSLog() for reference:

2009-09-15 10:26:38.591 delme[38163:10b] Hello, World!
+3  A: 

IIRC, it's a thread id.

Michael Krelin - hacker
A: 

hacker, it probably is some sort of thread id, but how would I obtain it (not using NSLog)? I've tried looking at the result of pthread_self(), documentation for NSThread, etc. and haven't found out where that "thread id" value comes from.

RJ
This should be a comment to the answer, not an answer itself
Brandon Bodnár
Sorry, forgot to log-on and didn't see the comment button
Delete this answer to get a badge.
Epsilon Prime
+6  A: 

It’s the thread ID; specifically, it’s the mach thread ID. You can get it yourself:

pthread_mach_thread_np(pthread_self())
Chris Suter