             #if DEBUG
                 let endTime = NSDate()
                 let totalTime = endTime.timeIntervalSince(startTime as Date)
-                print("WikipediaKit: \(totalTime) seconds for network retrieval & JSON decoding")
+                self.logMessage("\(totalTime) seconds for network retrieval & JSON decoding")
             #endif
             
             completion(jsonDictionary, nil)

            WikipediaNetworking.sharedActivityIndicatorDelegate?.stop()

            #if DEBUG
                let endNetworkingTime = NSDate()
                let totalNetworkingTime: Double = endNetworkingTime.timeIntervalSince(startTime as Date)
                print("WikipediaKit: \(totalNetworkingTime) seconds for network retrieval")
            #endif

            if let error = error {

        return WikipediaNetworking()
    }()

    public var debugPerformance = false

    private func logMessage(_ message: String) {
        #if DEBUG
        if self.debugPerformance {
            print("WikipediaKit: \(message)")
        }
        #endif
    }

    public static weak var sharedActivityIndicatorDelegate: WikipediaNetworkingActivityDelegate?
    
    let session = URLSession(configuration: URLSessionConfiguration.default)
