         XCTAssert(!thisObject.descriptionInvoked, "Fail: String was interpolated when it shouldn't have been")
     }
 
-    func testExecExecutes() {
-        let log: XCGLogger = XCGLogger()
-        log.identifier = "com.cerebralgardens.xcglogger.testExecExecutes"
+    /// Test that closures for a log execute when required
+    func test_00070_ExecExecutes() {
+        let log: XCGLogger = XCGLogger(identifier: functionIdentifier())
         log.outputLogLevel = .Debug
 
         var numberOfTimes: Int = 0

        XCTAssert(numberOfTimes == 0, "Fail: Didn't execute the closure when it should have")
    }

    func testMultiThreaded() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testMultiThreaded"
        log.setup(.Debug, showThreadName: true, showLogLevel: true, showFileNames: true, showLineNumbers: true, writeToFile: nil)

        let linesToLog = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"]
        let myConcurrentQueue = dispatch_queue_create("com.cerebralgardens.xcglogger.testMultiThreaded.queue", DISPATCH_QUEUE_CONCURRENT)
        dispatch_apply(linesToLog.count, myConcurrentQueue) { (index: Int) in
            log.debug(linesToLog[index])
        }
    }

    func testMultiThreaded2() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testMultiThreaded2"
        log.setup(.Debug, showThreadName: true, showLogLevel: true, showFileNames: true, showLineNumbers: true, writeToFile: nil)

        let linesToLog = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"]
        let myConcurrentQueue = dispatch_queue_create("com.cerebralgardens.xcglogger.testMultiThreaded2.queue", DISPATCH_QUEUE_CONCURRENT)
        dispatch_apply(linesToLog.count, myConcurrentQueue) { (index: Int) in
            log.debug {
                return "\(linesToLog[Int(index)])"
            }
        }
    }

    func testBackgroundLogging() {
        let log: XCGLogger = XCGLogger(identifier: "com.cerebralgardens.xcglogger.testBackgroundLogging", includeDefaultDestinations: false)
        let systemLogDestination = XCGNSLogDestination(owner: log, identifier: "com.cerebralgardens.xcglogger.testBackgroundLogging.systemLogDestination")
        systemLogDestination.outputLogLevel = .Debug
        systemLogDestination.showThreadName = true
        // Note: The thread name included in the log message should be "main" even though the log is processed in a background thread. This is because
        // it uses the thread name of the thread the log function is called in, not the thread used to do the output.
        systemLogDestination.logQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)
        log.addLogDestination(systemLogDestination)

        let linesToLog = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"]
        for line in linesToLog {
            log.debug(line)
        }
    }

    func testDateFormatterIsCached() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testDateFormatterIsCached"

        let dateFormatter1 = log.dateFormatter
        let dateFormatter2 = log.dateFormatter

        XCTAssert(dateFormatter1 == dateFormatter2, "Fail: Received two different date formatter objects")
    }

    func testCustomDateFormatter() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testCustomDateFormatter"
        log.outputLogLevel = .Debug

        let defaultDateFormatter = log.dateFormatter

        let dateFormat = "MM/dd/yyyy hh:mma"

        let dateFormatter = NSDateFormatter()
        dateFormatter.dateFormat = dateFormat

        log.dateFormatter = dateFormatter

        log.debug("Test date format is different than our default")

        XCTAssertNotNil(log.dateFormatter, "Fail: date formatter is nil")
        XCTAssertEqual(log.dateFormatter!.dateFormat, dateFormat, "Fail: date format doesn't match our custom date format")
        XCTAssert(defaultDateFormatter != dateFormatter, "Fail: Did not assign a custom date formatter")
    }

    func testVariousParameters() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testVariousParameters"
        log.outputLogLevel = .Verbose

        log.info("testVariousParameters starting")
        log.verbose()
        log.verbose {
            return nil
        }
        log.debug(1.2)
        log.info(true)
        log.warning(["a", "b", "c"])
        log.error {
            return NSDate()
        }
        
        let optionalString: String? = "text"
        log.severe(optionalString)
    }

    func testNoMessageClosure() {
        let log: XCGLogger = XCGLogger()
        log.identifier = "com.cerebralgardens.xcglogger.testNoMessageClosure"
        log.outputLogLevel = .Debug

        log.debug()

        log.noMessageClosure = { return "***" }
        log.debug()

        log.noMessageClosure = { return NSDate() }
        log.debug()

        log.noMessageClosure = { return nil }
        log.debug()

        log.noMessageClosure = { return "" }
        log.debug()
    }
}

    //        }
    //    }

    /// Test that if we request the default instance multiple times, we always get the same instance
    func test_00010_DefaultInstance() {
        let defaultInstance1: XCGLogger = XCGLogger.defaultInstance()
        let defaultInstance2: XCGLogger = XCGLogger.defaultInstance()

        XCTAssert(defaultInstance1 === defaultInstance2, "Fail: defaultInstance() is not returning a common instance")
    }

    /// Test that if we request the multiple instances, we get different instances
    func test_00020_DistinctInstances() {
        let instance1: XCGLogger = XCGLogger()
        instance1.identifier = "instance1"

