Skip to main content

std-nslog

Generic BeeWare Logo

Python Versions PyPI Version Maturity BSD License Discord server

std-nslog is a shim that redirects stderr/stdout to the Apple unified logging system (os_log, the modern replacement for NSLog). This can be useful when deploying Python code as a standalone app on macOS or iOS, where stdout/stderr aren't easily visible for end users.

This functionality is baked into Python 3.14+ if you are using an embedded interpreter - set config.use_system_logger = 1 when configuring the interpreter. The same functionality exists in all iOS CPython builds (where it is enabled by default).

Usage

std-nslog will generally only be needed in the context of a bundled macOS application. You shouldn't ever need to install it yourself into a local virtual environment. However, just in case...

To install std-nslog:

$ pip install std-nslog

Then, in your code, import nslog. This will install the shim. The file only needs to be imported once; preferably as early as possible in the Python application code.

Once installed, all output written to stdout and stderr will be redirected to the unified logging system; stdout is logged at OS_LOG_TYPE_DEFAULT, and stderr at OS_LOG_TYPE_ERROR, so the two streams can be filtered separately in Console.app or log stream.

Why no pun?

While an obscure joke referencing apples and logs might be amusing, it would make no sense when it appeared in a Briefcase requirements file.

Community

std-nslog is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with std-nslog, log them on GitHub. If you want to contribute, please fork the project and submit a pull request.

Metadata

Release files for std-nslog 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for std-nslog 2.0.0
File Size Uploaded
std_nslog-2.0.0.tar.gz 18.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for std-nslog 2.0.0
File Interpreter ABI Platform
std_nslog-2.0.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
std_nslog-2.0.0-cp310-abi3-macosx_10_9_x86_64.whl CPython 3.10 abi3 macOS 10.9+ x86-64 Details
std_nslog-2.0.0-cp310-abi3-macosx_10_9_universal2.whl CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 42.0 kB

Release files / std_nslog-2.0.0.tar.gz

Download URL std_nslog-2.0.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
63e4e661d67b69458435dd23eef5d0c1e59d954ccf80b597c398a13afbfbbc11
BLAKE2b-256 checksum
How to use checksums
b4ecb1dcda86be2310c326e20908068fb2cc8d11a01262c0bbfe41fad1454a69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / std_nslog-2.0.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL std_nslog-2.0.0-cp310-abi3-macosx_11_0_arm64.whl
Size 7.9 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d01bce53bbca2aba23ed0d537302b59488182b0658a8502172977f05bb21957b
BLAKE2b-256 checksum
How to use checksums
528342efa1059c797434927b480b09ddbe824506a25c584e1ad2a0db200c82e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / std_nslog-2.0.0-cp310-abi3-macosx_10_9_x86_64.whl

Download URL std_nslog-2.0.0-cp310-abi3-macosx_10_9_x86_64.whl
Size 6.9 kB
Tags CPython 3.10 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
50f377c4d98279eb246053564e17d7943de2933a9243386f1c09092d6344df90
BLAKE2b-256 checksum
How to use checksums
ba3464c89bf5269f16590886b631f6eefb28265f529464a0d367d82245b023d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / std_nslog-2.0.0-cp310-abi3-macosx_10_9_universal2.whl

Download URL std_nslog-2.0.0-cp310-abi3-macosx_10_9_universal2.whl
Size 8.5 kB
Tags CPython 3.10 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
847e39549bf04163bd90cfb2ba004c062aeea856b94b12d389d870fbc195652e
BLAKE2b-256 checksum
How to use checksums
4dbca9b0e940758a92a3811e63d7524a97107c3224d0c50ea5152e79f1377f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

4 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page