In Console.app, how can I reveal to what <private> tags are actually referring?

8

3

In the last several versions of MacOS, Console.app has become increasingly more censored, to the point of near uselessness.

Filenames and URLs have been replaced by <private>tags, making it impossible to track down and remedy errors.

While the following example isn't an error, nor is it the file permissions error I was having for literally years with cfprefsd, unable to track it down, it is an example as to how vague and unhelpful most messages logged with Console.app have become:

 com.apple.WebKit.Networking [19870 <private> <private>] start

How can I reveal to what the <private> tags refer in Console.app log messages?

Nevin Williams

Posted 2018-04-06T21:08:26.647

Reputation: 3 725

Answers

12

Console.app can be made to display actual file paths and URLs instead of private by issuing the following command in Terminal.app:

    sudo log config --mode "private_data:on"

This causes messages logged to Console.app to display more specific and helpful information, like URLs and filenames, instead of just the cryptic <private> tags, but not retroactively. The error or condition will have to occur again for the previously censored data to be displayed.

So an essentially useless message like:

  com.apple.WebKit.Networking [19870 <private> <private>] start

would then be expanded to something like:

 com.apple.Webkit.Networking [19920 www.facebook.com:443 stream, pid: 5311, url: https://www.facebook.com/api/graphqlbatch/, tls] start

Since to leave private_data:on long-term may compromise privacy and security, the logging facility can be returned to its normal obscure level with this command:

sudo log config --mode "private_data:off"

once finished tracking down the desired event.

Nevin Williams

Posted 2018-04-06T21:08:26.647

Reputation: 3 725

1

As per mjtsai it seems this solution doesn't work on Catalina https://mjtsai.com/blog/2019/11/21/catalinas-log-cant-be-unprivatised/

– Marek H – 2019-11-24T00:02:10.653