Console flooded with CFNetwork and DataDetectorsUI Logs

Ever since I've updated to Xcode 15.2 (I'm currently using Xcode 15.3) my console gets flooded with logs from CFNetwork and DataDetectorsUI. I've never seen those logs before. Is there a way to suppress them? I can't even find my own logs anymore without filters.

CFNetwork

Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> resuming, timeouts(25.0, 604800.0) QOS(0x15) Voucher (null)
[Telemetry]: Activity <nw_activity 12:2[78557FD1-54F3-4B77-8C5C-57F500D67286] (reporting strategy default)> on Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> was not selected for reporting
Connection 29: set is idle false
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> now using Connection 29
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> sent request, body S 535
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> received response, status 201 content U
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> done using Connection 29
Connection 29: set is idle true
HTTP/2 Connection 29 Stream 7 ended successfully true
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> request *** is NOT allowed to set HSTS for main doc (null)
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> response ended
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> finished successfully
Connection 19: cleaning up
Connection 19: done
Applying proxy auth: response=(null), proxyURL=(null), request=(null), credentials=(null), handle=0x11c2f7d30
Connection 21: cleaning up
Connection 23: cleaning up
Connection 22: cleaning up

DataDetectorsUI

operation 0x10ff7e560
operation 0x10ff7e560 is discarded
Calling the completion block for 0x10ff7e560
dispatchScanQueryCreationWithCompletionBlock of operation <DDTextKitOperation: 0x10ff7e560> completion block: success: 0
operation 0x10ff7e560
operation 0x10ff7e560
operation 0x10fb2f850
really creating scan query in operation 0x10fb2f850!
operation 0x10fb2f850

To be clear, we’re talking about the Console pane is Xcode, right?

If so, it’s likely that there’s some sort of environmental factor in play here. If you create a tiny test project that uses URLSession in a similar way to your main app, do you see this logging there?

If the test project doesn’t have the problem, look to see if your main app’s project has any log-related environment variables configured.

FWIW, I tried this in a tiny test project here in my office and didn’t see this logging. I’m using Xcode 15.3 or macOS 14.4 with a command-line project containing the following code:

import Foundation

func main() async {

    let url = URL(string: "https://example.com")!
    let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0)
    do {
        print("will start task")
        let (data, r) = try await URLSession.shared.data(for: request)
        let response = r as! HTTPURLResponse
        print("task finished, status: \(response.statusCode), bytes: \(data.count)")
    } catch let error as NSError {
        print("task did fail, error: \(error.domain) / \(error.code)")
    }
}

await main()

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I did some more testing since the project doesn't use any log-related environment variables. It turned out that it had something to do with the iPhone I was using to run the app on. It was on iOS 17.1.1. I updated it to 17.4 and now those logs are gone. Not really sure what was going on though ... Thanks anyway @eskimo :)

Console flooded with CFNetwork and DataDetectorsUI Logs
 
 
Q