I couldn't find a wrapper to get current thread id.
There is Thread.getThis but the address it returns is the same for all threads as explained here (http://ddili.org/ders/d.en/concurrency.html) so it's not useful for logging.
How about adding this:
auto getTid() to class Thread
Implementation on OSX:
mach_port_t tid = pthread_mach_thread_np(pthread_self());