Fix logger data races