macOS 26 changed the default visibility of "dynamic" system messages. This
changes the logging strategy to tag all messages as "public" so they are
visible in the system log without special configuration.
(cherry picked from commit
71fc4c66d3e675a5481b6b76e6c707c9b6f1e0e0)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
--- /dev/null
+When system logging is enabled (with ``config.use_system_logger``, messages
+are now tagged as public. This allows the macOS 26 system logger to view
+messages without special configuration.
// Pass the user-provided text through explicit %s formatting
// to avoid % literals being interpreted as a formatting directive.
- os_log_with_type(OS_LOG_DEFAULT, logtype, "%s", text);
+ // Using {public} ensures "dynamic" string messages are visible
+ // in the log without special configuration.
+ os_log_with_type(OS_LOG_DEFAULT, logtype, "%{public}s", text);
Py_RETURN_NONE;
}