If you find something useful on here, it's probably an accident.

Unified Logging in macOS Sierra replaces important information with private to hide the contents

Background

The new Console app in Sierra was a complete redesign, but also came with an entirely new logging mechanism. This changed much about the way logging works on macOS. No longer are there separate files for individual logs, but rather a Unified Logging mechanism which centralises the logs into a single database. You can find more information about Unified Logging in the WWDC session.

Most notably for users, this change affects the way sensitive information is logged. Where the OS (or the app developer) decides that personal information is being logged, it will replace it with <private>. This means it cannot be viewed by other apps on the system, but also means the user has no access to it, as shown in the screenshot below.

Showing private logs

To show all private logs in the macOS Sierra console, run the following command in Terminal:

sudo log config --mode "private_data:on"

For app developers, to override the OS and write publicly to the log, use the following format:

%{public}s
Unified Logging in macOS Sierra replaces important information with private to hide the contents
Need help?