Use mock logger in tests.