Post

Replies

Boosts

Views

Activity

Reply to os_log private not shown in Ventura
Hmmm, more questions (I do wonder what I am again overlooking), this time related to the levels. I've tried to play with the Level sub-dictionary. Not surprisingly, in Info.plist it does nothing. In a plist stored in ...Logging/Subsystems it sort of works, sort of; the log tool sees the setup: 248 root Preferences/Logging/Subsystems# <cz.ocs.CCCy.plist <?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>DEFAULT-OPTIONS</key> <dict> <key>Enable-Private-Data</key> <true/> <key>Level</key> <dict> <key>Enable</key> <string>Default</string> </dict> </dict> </dict> </plist> 249 root Preferences/Logging/Subsystems# log config --status --subsystem cz.ocs.CCCy Mode for 'cz.ocs.CCCy' DEFAULT PERSIST_DEFAULT 250 root Preferences/Logging/Subsystems# The problem is, it does not seem to affect the logging at all. Whatever I set in there — I've tried all values from Default to Debug — the outcome is always the same: the log tool properly shows whatever I set in there (meaning my dicts probably are not all wrong) nevertheless, both Xcode and Console (when both Action/Include... are on) always print out all the message levels, including os_log_info and os_log_debug, regardless the current setting — even though Default is set up as shown above. What am I overlooking now? The subsystem and category settings are all right, proved by that Enable-Private-Data works all right. The level setup seems OK too, given it is confirmed by log config --status. Nevertheless I can't see why neither Xcode nor Console are affected by the level settings the slightest bit?
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’23
Reply to os_log private not shown in Ventura
Essentially solved. Sorry, I'm completely dumb and have messed up the categories; with os_log_t withss=os_log_create("cz.ocs.CCC", "app"); os_log(withss,"private-ss shown: %@", [NSString stringWithFormat:@"OK"]); it works all right, based on the profile installed. Also, with DEFAULT-OPTIONS category works all right for any category inside of the right subsystem. Whew! Nevertheless, still the Info.plist part still does not seem to work: whatever I set up in there yields <private> is there a way to set up the profile so that OS_LOG_DEFAULT works? Xcode show the subsystem for my app as “CCC”, Console shows an empty string, but neither works (nor does its bundle identifier, which happens to be “cz.ocs.CCC”) is there a way to set up Enable-Private-Data for more subsystems at once, without multiplicating the dictionaries? I did find DEFAULT-OPTIONS for categories, but I did not find anything like that for subsystems. Thanks a lot and do please forgive my previous stupidity. P.S. The option to store directly the options plist into “/Library/Preferences/Logging/Subsystems/” seems to work as well; is there some drawback to it, a reason why you suggest profile installation (which does essentially the same under the hood) instead? Anyway, it sort-of solves my third question, for at least, in the folder I can set up as many subsystems as I want to through hard-links :) Though still, a way to set up “any cz.ocs.* subsystem” would be really handy, if possible somehow.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’23
Reply to os_log private not shown in Ventura
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>
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’23
Reply to Changing the mouse cursor over a frontmost view of a non-active application
NSTrackingArea with cursorUpdate does not work (it is documented not to; I've tried it just out of desperation since no other way worked either). NSTrackingArea with mouseEntered: and mouseExited: is not related to the mouse cursor shape at all, far as I understand properly. Do please correct me if I am wrong, but I understand that's just one possible way (there are others as well) to detect that the current mouse position is over my view. That's not the problem. The problem is changing the cursor. I presume I should call NSCursor.push (or set) when entered, pop (or a manual reset) when exited. Which, as mentioned above, does not work for me :( Does it work for you (ie. does NSCursor.push or set work for you even when called from an inactive application), which would mean I am doing something wrong?
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’23