Fix logging unit tests. Thanks @shadowfax-chc.