[PATCH v4 22/23] util: add support for formatting thread info in messages