Quinn,
thanks! Alas, I must be still doing something wrong, neither approach did help :(
I've extended my test code to try both, the default and explicit subsystem, like this:
os_log(OS_LOG_DEFAULT,"private shown: %@", [NSString stringWithFormat:@"OK"]);
os_log_t withss=os_log_create("cz.ocs.CCC", "test");
os_log(withss,"private-ss shown: %@", [NSString stringWithFormat:@"OK"]);
I've removed my previous profile, copied down the profile from the end of your linked message, changed the system ID and display name, saved it as “syslog-CCC.mobileconfig”, installed as new profile in Settings. Installation went OK, looks like this:
Tested, still getting <private>, both in Xcode and Console, for both the logs. For reference, my slightly changed profile added completely at the end of this message. To make extra sure, I've tried also to install the profile verbatim with your original content (com.example.apple-samplecode.Test738648 etc); not surprisingly did not help either.
I've added the first snippet (again with only change in the subsystem ID) to my “Info.plist”. Checked that it is indeed properly generated into the build:
1016 ocs /tmp> ~/Library/Developer/Xcode/DerivedData/CCC-aqmufkksnhojayaidbhwkprlyegv/Build/Products/Debug
1017 ocs Build/Products/Debug> tail -14 CCC.app/Contents/Info.plist
<string>NSApplication</string>
<key>OSLogPreferenceso</key>
<dict>
<key>cz.ocs.CCC</key>
<dict>
<key>app</key>
<dict>
<key>Enable-Private-Data</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
1018 ocs Build/Products/Debug>
Still I am consistently getting <private> in all the cases :( Again, to make completely sure I am not missing something obvious, I've tried the same with your original com.example.apple-samplecode.Test738648 key and also with com.example.apple-samplecode.PrivateValueLogger, as shown in the detailed documentation; neither (not surprisingly) did help.
I am outta ideas. What could be wrong, what should I check? Thanks!
Almost forgot: macOS 13.6 (22G120), Xcode 15.0.1 (15A507), MacBook Air M1, 2020 (should be irrelevant, but who knows). I've restarted both Console and Xcode. I did not restart macOS (since I've got open work in other apps, not speaking of this message); I'll try that later and will add here the outcome.
Here's a complete contents of my slightly updated profile, as I've tested it:
1015 ocs /tmp> <syslog-CCC.mobileconfig
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>System Logging CCC</string>
<key>PayloadDisplayName</key>
<string>System Logging CCC</string>
<key>PayloadIdentifier</key>
<string>com.apple.system.logging.684C6584-DDFB-4DC5-AD4B-DF084028C248</string>
<key>PayloadType</key>
<string>com.apple.system.logging</string>
<key>PayloadUUID</key>
<string>684C6584-DDFB-4DC5-AD4B-DF084028C248</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>Subsystems</key>
<dict>
<key>cz.ocs.CCC</key>
<dict>
<key>app</key>
<dict>
<key>Enable-Private-Data</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</array>
<key>PayloadDescription</key>
<string>Enables logging for the CCC app.</string>
<key>PayloadDisplayName</key>
<string>CCC Enable Logging</string>
<key>PayloadIdentifier</key>
<string>Slimey.02BFD8E9-601F-40D3-96CF-8EA446D0ABD6</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>84BE502F-BB63-4D65-BBAF-64FCC31AA00A</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
1016 ocs /tmp>