Remote Unified Logging after release?

I am looking for a logging solution that is usable after the app is released to help keep track of errors etc. Does the Apple "Unified Logging" allow you to do this? After a quick glance at the documentation it is not clear how I can view logs after release. If not is there any 'Apple way' of monitoring logs after release without having to use a third party solution like Firebase?
Answered by DTS Engineer in 638650022
It kinda depends on what your expectations are. The two standard techniques are:
  • If you have access to the device then you can monitor the system log by attaching it to a Mac and running Console.

  • If you’re trying to debug a hard-to-reproduce problem coming in from the field, you can have the user trigger a sysdiagnose log which has a copy of the system log embedded within it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer
It kinda depends on what your expectations are. The two standard techniques are:
  • If you have access to the device then you can monitor the system log by attaching it to a Mac and running Console.

  • If you’re trying to debug a hard-to-reproduce problem coming in from the field, you can have the user trigger a sysdiagnose log which has a copy of the system log embedded within it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thank you @eskimo, It appears to me that the sysdiagnose log is actually for investigating issues at the 'system wide' level and not at the app level (Such as monitoring the occurance of an app specific error) Is that correct?

It appears to me that the sysdiagnose log is actually for
investigating issues at the 'system wide' level and not at the app
level

It’s both. If you log using the unified logging API your log entries will go into the system log and thus be captured by the sysdiagnose log. This can be very handy if you want to see if an app-level problem is related to a system-level problem.

It would be nice if there was an API for an app to read its log entries back from the system log. We have that API, the OSLog framework, but it’s not available on iOS yet.

Finally, I want to give a callout to MetricKit, which is a great way to get various metrics out of the system so that you can integrate them with whatever reporting system you decide on.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks again  @eskimo. MetricKit is also very interesting indeed. One more question about sysdiagnose log. The user has to take some manual steps to trigger the sysdiagnose log I guess. There is no automated way to send events to the cloud and look at it in a back end. I am guessing that is where MetricKit comes in. You can signPost critical bits of code and view them online. Is that right?

The user has to take some manual steps to trigger the sysdiagnose log
I guess.

Correct. The standard instructions are on our Bug Reporting \> Profiles and Logs page.

There is no automated way to send events to the cloud and look at it
in a back end.

Correct. Honestly, unified logging is way too low-level for that sort of thing.

I am guessing that is where MetricKit comes in

Not quite. MetricKit is about giving you API-level access to metrics that are hard to gather otherwise. It does not provide the server side of this. You’d have to build that yourself, either directly, on top of Apple’s infrastructure, or on top of some third-party infrastructure.

Oh, one last thing: App Store Connect provides some standard analytics that you might want to look into.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Remote Unified Logging after release?
 
 
Q