Replace rule logger during tests.