Xcode 15 console logging of system messages

Background

I have a SwiftUI app that uses OSLog and the new Logger framework. In my SwiftUI views, I would like to use something like Self._logChanges() to help debug issues.

After some trial and error, I can see the messages appear in the System console log for the app I am debugging using the com.apple.SwiftUI subsystem.

Problem

I'd like to see those same messages directly in Xcode's console window so I can filter them as needed. How do I do that?

Thanks! -Patrick

I'd like to see those same messages directly in Xcode's console window so I can filter them as needed. How do I do that?

Right now there’s no way to do this )-: The _logChanges() method is implemented within the SwiftUI library itself, and Xcode’s console window filters out system library log entries by default. There’s current no way to disable that.

We have a bug on file about this already (r. 90650448). If you want to track its status, file your own bug and ask that it be dup’d to this one.

The best workaround right now is to use other system log facilities to monitor your logging. You can set these up to display both your logging and this SwiftUI logging together.

Share and Enjoy

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

Thanks, will do and appreciate the confirmation!

You could use Self._printChanges in the meantime. I believe they print the same thing and that appears in the Xcode console.

Xcode 15 console logging of system messages
 
 
Q