Do logging on its own thread for somewhat improved performance.