use thread ID instead of process ID in logger messages (issue #5349)