PatternFormatter provides %T and %I to print the thread name and thread id. Those patterns depend on attributes of Message which are set in the init() function, using Thread::current() and calling getName() and getTid() on the thread if any.
Since Thread::current() works only for a thread that has been created using Poco::Thread, it does not work for threads that were created in another library (eg. std::thread).