I’ve just received the following reply from Apple regarding this bug:
Engineering has provided the following information regarding this issue:
This has ever worked, at least not the way you’re doing it. (Also, terminology: AppleScriptObjC refers to the AppleScript/Objective-C bridge — using Objective-C frameworks from AppleScript. This is merely using NSAppleScript to execute a script.)
AppleScript’s “log” statement relies on having an Apple event handler for it installed in the current process. Script Editor and osascript provide this, but NSAppleScript does not. You would either have to run your script via osascript, probably using NSTask, or else install your own event handler for kASAppleScriptSuite/kASComment in your process.
Frankly, I have very little idea of what they’re talking about. All I know is that the log command did work in Xcode logs prior to Xcode 16.
My current workaround for this is to create a custom method that calls NSLog in the Objective-C app delegate, which method I call from ASOC. (It’s quite possible that better workarounds exist.)