     
     internal func addAnalyticsMetadataToRequest() {
         
-        Logger.internalLogger.debug("Recording request analytics")
+        Analytics.logger.debug("Network request outbound")
         
         // The analytics server needs this ID to match each request with its corresponding response
         self.trackingId = NSUUID().UUIDString


        // Build the analytics metadata header
        
        var osVersion = ""
        var model = ""
        var deviceId = ""

    
    internal func logInboundResponse(response: Response, url: String) {
        
        Analytics.logger.debug("Network response inbound")
        
        let endTime = NSDate.timeIntervalSinceReferenceDate()
        let roundTripTime = endTime - startTime
        let bytesSent = self.requestBody?.length ?? 0
        
        // Data for analytics logging
        var responseMetadata: [String: AnyObject] = [:]
        
        responseMetadata["$category"] = "network"
        responseMetadata["$path"] = url
        responseMetadata["$trackingId"] = self.trackingId
        responseMetadata["$outboundTimestamp"] = startTime
        responseMetadata["$inboundTimestamp"] = endTime
        responseMetadata["$roundTripTime"] = roundTripTime
        responseMetadata["$responseCode"] = response.statusCode
        responseMetadata["$bytesSent"] = bytesSent
        
        if (response.responseText != nil && !response.responseText!.isEmpty) {
            responseMetadata["$bytesReceived"] = response.responseText?.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)
        }
        Analytics.logger.analytics(responseMetadata)
    }
    
    
