Fix log threadname lookup handling not beeing threadsafe