FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-150644: Tag Apple system log messages as public. (GH-150645) by miss-islington · Pull Request #150739 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.
4 changes: 3 additions & 1 deletion Python/pylifecycle.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2972,7 +2972,9 @@ apple_log_write_impl(PyObject *self, PyObject *args)

// 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;
}

Expand Down
Loading

Back | FazBrowse Home | New Git URL