Title: Add option for redirecting stdout and stderr to the system log · Issue #126821 · python/cpython · GitHub
Open Graph Title: Add option for redirecting stdout and stderr to the system log · Issue #126821 · python/cpython
X Title: Add option for redirecting stdout and stderr to the system log · Issue #126821 · python/cpython
Description: Feature or enhancement Proposal: Python currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. However, on iOS, stdout/stderr content is only really visible while in Xcode. Whe...
Open Graph Description: Feature or enhancement Proposal: Python currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. However, on iOS, stdout/stderr content is...
X Description: Feature or enhancement Proposal: Python currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. However, on iOS, stdout/stderr content is...
Opengraph URL: https://github.com/python/cpython/issues/126821
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add option for redirecting stdout and stderr to the system log","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nPython currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. \nHowever, on iOS, stdout/stderr content is only really visible while in Xcode. When an app is running in the wild, the expectation is that the app will use the system log for all output needs. \n\nOn iOS, stdout and stderr should be automatically directed to the system log (with appropriate log levels). This matches what Android does by default (see #118063). Existing iOS apps in the wild need to use a shim such as [std-nslog](https://pypi.org/project/std-nslog/) to ensure that stdout/err content can be loaded at runtime. This also complicates the iOS testing story, as stdout/stderr content is only visible at the end of a test run, rather than being streamable content as the test runs.\n\nAs iOS and macOS share an underlying logging framework, it should also be possible to have this functionality on macOS as well (on an opt-in basis when the Python interpreter is configured). This would be useful for Python code that has been embedded into a native macOS GUI app. At present, stdout and stderr are essentially inaccessible for apps of this type.\n\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-127755\n* gh-127806\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/freakboy3742","@type":"Person","name":"freakboy3742"},"datePublished":"2024-11-14T07:01:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/126821/cpython/issues/126821"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2e955252-7d59-1b40-197a-5a506898316e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C590:8D103:10524E1:15D76F4:696ACF2D |
| html-safe-nonce | eee2726acae3166849ec6f30dbce72ea90261fc6ef3f6f333115998d854bc465 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTkwOjhEMTAzOjEwNTI0RTE6MTVENzZGNDo2OTZBQ0YyRCIsInZpc2l0b3JfaWQiOiI1MzEwNTk1NjU0NDUzMjE5MTE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cbaa0384535188cc2514eddc29e1003c17a2636f0ff675f8d209a6d9bf6a7b0c |
| hovercard-subject-tag | issue:2657824284 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/126821/issue_layout |
| twitter:image | https://opengraph.githubassets.com/596590f4f71b1c4fc9a7d91eee3036e7cf495204fe77a9caee8966528103d600/python/cpython/issues/126821 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/596590f4f71b1c4fc9a7d91eee3036e7cf495204fe77a9caee8966528103d600/python/cpython/issues/126821 |
| og:image:alt | Feature or enhancement Proposal: Python currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. However, on iOS, stdout/stderr content is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | freakboy3742 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c718a376fcf780eb22089171adb84a543f660bf7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width