Hi, I'm currently working on exporting logs from a user's phone. Let's say I want to include an option in the settings that allows the user to retrieve all logs recorded via Logger.
I've found that it's possible to use OSLogStore to get logs recorded via Logger. It has initializer with the scope of the current process identifier OSLogStore(scope: .currentProcessIdentifier)
. This method works fine until the app is killed or crashes. How can I retrieve the persistent logs in a manner similar to the log collect
command? We need to access logs from when the app was killed or crashed, and we don't have direct access to the user's phone.