Still recently we simplified this. Because having a singleton means basically that you have a global variable with a reference to some object which is created when your classes are being loaded. So we replaced object with just a global top level declaration of variable and it looks like this.
var logger: ()->Logger = { productionLogger }
Later in test we write:
logger = {testLogger}