This reverts commit 13872543e074adc153b440660beda441fd562f53. That commit was wrong because we use-after-free the logger