UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

unified logging system, retrieve logs on device

Forums > iOS

Hi all,

is it somehow possible to retrieve entries logged via os_log and show them inside the app? The prupose of this would be a screen that helps with debugging in the field.

thanks,

Oliver

3      

I'm trying to figure this out, too. I'm able to get crash logs for when my app has a critical error through testflight, but I can't figure out problems remotely that don't cause a hard crash.

I've been looking into Swift-Log (https://github.com/apple/swift-log) and SwiftyBeaver (https://github.com/SwiftyBeaver/SwiftyBeaver) but it looks like they only can capture things that you explicitly log by calling their functions, not everything that's captured by os_log.

This threat talks about creating and then retrieving the sysdiagnostic logs that can be created, but these files are huge https://stackoverflow.com/questions/42588673/how-can-i-retrieve-messages-logged-with-os-log-from-ipad-iphone

I'm still on the search for things to help debug in the field using os_log or something that the system automatically captures, would love any feedback if anyone knows of something to help!

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.