         }
     }
     
-    lazy var logger: LogWriter = {
-        return LogWriter(levels: levels, messageWriter: { (msg, lvl) in
-            self.lastLog = (lvl, msg)
-            self.lastError = nil
-        }) { (error) in
+    init(_ levels: [LogLevel]) {
+        self.levels = levels
+        errorObjectWriter = { error in
             self.lastLog = nil
             self.lastError = error
         }
-    }()
-    
-    init(_ levels: [LogLevel]) {
-        self.levels = levels
+        messageWriter = { message, level in
+            self.lastLog = (level, message)
+            self.lastError = nil
+        }
     }
 }
 
 class LogCentralTests: XCTestCase {
 
+    var errorLogger = TestLogger([.error])
+    var infoLogger = TestLogger([.info])
+    var debugLogger = TestLogger([.debug])
+    
+    override func setUp() {
+        loggers = []
+        errorLogger = TestLogger([.error])
+        infoLogger = TestLogger([.info])
+        debugLogger = TestLogger([.debug])
+    }
+    
     func testActivity() {
         let myActivity = Activity("MY_ACTIVITY", parent: .none)
         myActivity.active {

    case test
}

class TestLogger {
    let levels: [LogLevel]
    var lastLog: (level: LogLevel, message: String)?
    var lastError: Error?
    

    }

    func testOneDualLevelLogger() {
        let infoAndDebugLogger = TestLogger([.info, .debug])
        
        log.info(in: .view, "not yet configured")
        XCTAssertEqual(infoAndDebugLogger.last, "Nothing logged")
        
        LogCentral.loggers = [infoAndDebugLogger]
        
        log.info(in: .view, "first log")
        XCTAssertEqual(infoAndDebugLogger.last, "[info] first log")
        
        log.debug(in: .view, "second log")
        XCTAssertEqual(infoAndDebugLogger.last, "[debug] second log")
    }
    
    func throwser() throws {
        throw TestError.test
    }
