sweetpad icon indicating copy to clipboard operation
sweetpad copied to clipboard

OSLog support

Open AndriiPetrovDev opened this issue 10 months ago • 1 comments

I can see usual prints but not OSLogs. How to enable them?

Image

Everything works in Xcode

Image

AndriiPetrovDev avatar Mar 14 '25 17:03 AndriiPetrovDev

I fix this with:

if ProcessInfo.processInfo.environment["__XCODE_BUILT_PRODUCTS_DIR_PATHS"] == nil {
    // run from `xcrun simctl launch`, print to console
    print(msg)
} else {
    // run from Xcode, use os.Logger
    self.logger.log(level: level, "\(msg, privacy: .public)")
}

mlch911 avatar Apr 02 '25 11:04 mlch911