Allow for Extracting Logs Sent to os_log

Number:rdar://30444429 Date Originated:09-Feb-2017 12:23 PM
Status:Duplicate of 30443590 (Open) Resolved:
Product:iOS + SDK Product Version:iOS 10
Classification:Enhancement Reproducible:Always
Something not on this list

os_log looks like a great logging API that fulfills all the requirements I have from a logging API except one: being able to get log messages back out for the purpose of being able to attach them when users submit bug reports and support emails.

I'm already able to do this with various other third-party logging frameworks, as they log to files that exist inside my sandbox. It is then trivial for me to get the files, compress them into an archive, and attach them on emails and bug reports.

I believe that this could be considered a regression since a) this new API replaces existing logging APIs and b) the old ASL APIs had a way of extracting logs, but the new os_log APIs do not. This was alluded to in session 721 "Unified Logging and Activity Tracing" from WWDC 2016 on one of the later slides:

> New APIs for searching new log data will not be made public this release
> - No equivalent asl_search functionality

Steps to Reproduce:
1. Write an app.
2. Log various bits of information using os_log.
3. Provide users with a way to send support emails or bug reports inside the app.

Expected Results:
That an API exists for me to get messages out that I had logged with os_log, and attach them as a file on the support email.

Actual Results:
The user sends a support email. I respond back asking them to send me logs by following the steps listed in this document (or the equivalent for other platforms):
I wait for an email back with the logs, assuming they have a computer and can get the logs in the first place.

What would have been a 0-step process has now become a multistep process with a potential multi-day timeline for looking into the issue the user has described.

iOS 10

I'm told Dave DeLong has also filed a radar for this issue. I imagine this one will be closed as a duplicate of his or some other similar radar. Searching on reveals two other potential radars that this one could be closed as duping: rdar://27055818 and rdar://27394053.

Any device that can run iOS 10



Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!