When deploying an app to my iOS device, triggering log collection via sysdiagnose, then exploring log messages in system_logs.logarchive obtained from iTunes sync, my app has never shown Info / Debug log messages type.
Please note that this question is different from existing but similar-sound questions like
I am using Paper Company (Swift) sample code from Apple to illustrate my problem. I start to deploy the app to my iOS device running iOS 11.0.3 as-is. The scheme is using Debug Mode. In my case:
logarchive file with Console, however, I never see my app’s Info and Debug messages. Other messages types, Default, Error, and Fault, continue to show up like when I live stream.

Because of such puzzling behavior, I started to think that it might have to do with system’s configuration. In Logging documentation:
Info-level messages are initially stored in memory buffers. Without a configuration change, they are not moved to the data store and are purged as memory buffers fill. They are, however, captured in the data store when faults and, optionally, errors occur. When info-level messages are added to the data store, they remain there until a storage quota is exceeded, at which point, the oldest messages are purged. Use this level to capture information that may be helpful, but isn’t essential, for troubleshooting errors.
After reading that, I have also tried to change the Error type to Fault type, just for the sake of verifying that Info type messages will show up.
os_log("B-b-b-b-b-b-b-bomb 💣!", log: ViewController.ui_log, type: .fault) // previously .error
However, I still don’t see any Info log messages in logarchive file.
My questions:
ASSETCATALOG_COMPRESSION Build Settings, as has been pointed out as important to make os_log work as expected. See Read logs using the new swift os_log api
logarchive, do I actually need to add a custom profile like shown in Apple’s Logging doc and this mobleconfig example? It seems suspicious, however, given that even with Fault type, the Info messages still don’t get logged, and that I can still see Info / Debug messages from other processes.I had a similar issue where I thought my logs were not happening (even though they showed up fine in real-time when connected to a device), but it was because I was only viewing log statements from the last 5 minutes. Try changing the Showing: setting in Console and see if you can find the statements that way.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With