Lately, I've switched from NSLog to the new os_log. My problem is, whatever I try, I can't see the private values in my 13.6 (22G120).
My test line is trivial
os_log(OS_LOG_DEFAULT,"private shown: %@", [NSString stringWithFormat:@"OK"]);
and it prints (both in Xcode and in Console)
private shown: <private>
I did install in Settings the appropriate profile (as found here, copied down, changed just my company info) — in vain, it did not help, not even after restarting my computer. For the record, the profile is shown below.
Can anybody see what am I doing wrong and why it does not work? Thanks!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ConsentText</key>
<dict>
<key>default</key>
<string>This will enable showing private strings and data in Unified Logs.</string>
</dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDisplayName</key>
<string>ManagedClient logging</string>
<key>PayloadEnabled</key>
<true/>
<key>PayloadIdentifier</key>
<string>com.apple.system.logging.89AE58D8-0A4A-448B-8AE0-761DEE2D007F</string>
<key>PayloadType</key>
<string>com.apple.system.logging</string>
<key>PayloadUUID</key>
<string>89AE58D8-0A4A-448B-8AE0-761DEE2D007F</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>System</key>
<dict>
<key>Enable-Private-Data</key>
<true/>
</dict>
</dict>
</array>
<key>PayloadDescription</key>
<string>Allows showing private log messages.</string>
<key>PayloadDisplayName</key>
<string>Allow Private Logs</string>
<key>PayloadIdentifier</key>
<string>cz.ocs.enable.private.logs</string>
<key>PayloadOrganization</key>
<string>OCSoftware</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>529DF49A-6CB3-4DE9-A29F-4C41EC88BFDD</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
I have a general discussion of this topic in Recording Private Data in the System Log. I also have a very specific example here. Between the two, I think you should have enough to get this working. Post back here if you continue to encounter problems.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"