Thursday, October 27, 2016

Sierra Log Littering

Daniel Jalkut:

Apple has dramatically revamped its standard logging mechanism. Unified Logging, available in macOS 10.12 and iOS 10, replaces various file-based logging approaches with a centralized, database-backed repository for log information of all levels of interest.

[…]

The two big losses, in my opinion, are that the sheer size, number, and variety of logging messages makes it impractical for users to skim the console for “real problems,” and that the resulting logging archives are so large that it’s impractical to casually include them with bug reports to Apple or 3rd party developers.

[…]

The logging system offers a variety of tools for annotating log messages, but even internal Apple groups do not seem to use these extensively or appropriately. The system supports the notion of three levels of log message: default, info, and debug. Only the “default” level messages are displayed by default in the Console app, yet all of the above-described garbage is displayed in that default mode.

Another annoying change is that formerly useful framework error messages now have have useful text (such as the particular views that are involved) redacted for privacy.

Seth Willits:

Need to see redacted <private> data logged by os_log on Sierra?

sudo log config --mode "private_data:on"

And in your own code, you can use the %{public}s format specifier for strings that you want to always be captured.

Lastly, though the Console app is more flexible, there is no longer an easy way for customers to save the logged data to a file.

Update (2016-10-29): Nick Heer:

I think it’s great that I don’t have to install all kinds of profiles to log critical debugging information, like I typically have to on iOS. But having too much data is equally dangerous: users won’t or can’t upload files, and it’s too much to sift through for power users and developers.

4 Comments RSS · Twitter


Sierra is a nightmare when it comes to logging. I was trying to figure out why an iMac was continuously showing disk activity and the fact is that due to some mysterious certificate issue, all the fucking iCloud daemons are spending their life logging warnings and not reporting a single thing to the end user: 1.9 GB of log records in 10 minutes. Thank you Captain Courage.


[…] Previously: Sierra Log Littering. […]



Leave a Comment