Is there a way to get any kind of thread identifier of the currently running thread without resorting to Objective-C\'s NSThread.
I\'m improving our custom debug tracing
I appreciate this is a pretty old question.
To get the same Thread ID that is reported in macOS's Console.app I used:
Thread ID
Console.app
uint64_t tid; pthread_threadid_np(NULL, &tid); printf("%#08x\nr", (unsigned int) tid);
A screenshot from Console.app on macOS.