The detail is coming from Apple's Unified logging.
If a debug message is a dynamic string, by default, <private>
will be displayed.
In order for the data to print out the actual string, the string must be declared public
when sent to logging. For example, in Swift this will display the text sent to the logger, as it's a static string:
static let logger = OSLog(subsystem: "com.company.myApp", category: "myCategory")
os_log(logger, "Some text that will display correctly");
However, this will display Some string: <private>
os_log(logger, "Some string: %s", "text that will display <private>")
In order for the text to display as expected, it would need to be declared with the public
tag:
os_log(logger, "Some string: %{public}s", "text that will display as expected")
If you're simply looking at logs for 3rd party applications, then you're not going to be able to view the data, by default.
However, there are some that report that it is possible to see the redacted data with the log
command line utility:
sudo log config --mode "private_data:on"
To my knowledge, this is not documented by Apple.
Post Catalina
Note that the above, undocumented switch was broken with the introduction of Catalina. However, it is now possible to reveal 'private' messages with a simple, signed configuration profile, as documented by Howard Oakley, here