How create Log Events with Swift?

How can I create Log Events to the console to diagnose issues?

If you're referring to the Console macOS app, then you should use the Logging framework.

Also, this does not belong in the SwiftUI category.

How create Log Events with Swift?
 
 
Q