https://github.com/beeware/std-nslog
A shim that redirects stderr/stdout to the Apple System Log (NSLog)
https://github.com/beeware/std-nslog
Last synced: 10 months ago
JSON representation
A shim that redirects stderr/stdout to the Apple System Log (NSLog)
- Host: GitHub
- URL: https://github.com/beeware/std-nslog
- Owner: beeware
- License: bsd-3-clause
- Created: 2022-02-28T02:27:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-23T00:22:32.000Z (12 months ago)
- Last Synced: 2025-06-23T01:26:11.126Z (12 months ago)
- Language: Python
- Size: 85 KB
- Stars: 8
- Watchers: 7
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
[
](https://beeware.org/)
# std-nslog
[](https://pypi.python.org/pypi/std-nslog)
[](https://pypi.python.org/pypi/std-nslog)
[](https://pypi.python.org/pypi/std-nslog)
[](https://github.com/beeware/std-nslog/blob/main/LICENSE)
[](https://beeware.org/bee/chat/)
std-nslog is a shim that redirects stderr/stdout to the Apple System Log
(NSLog). This can be useful when deploying Python code as a standalone
app on macOS or iOS.
## Usage
std-nslog primary exists as a utility for briefcase deployments. You
shouldn't ever need to install it yourself. 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 Apple System Log.
## 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](http://beeware.org). You can talk
to the community through:
- [@beeware@fosstodon.org on Mastodon](https://fosstodon.org/@beeware)
- [Discord](https://beeware.org/bee/chat/)
We foster a welcoming and respectful community as described in our [BeeWare
Community Code of Conduct](http://beeware.org/community/behavior/).
## Contributing
If you experience problems with std-nslog, [log them on
GitHub](https://github.com/beeware/std-nslog/issues). If you want to contribute, please [fork the project](https://github.com/beeware/std-nslog) and [submit a
pull request](https://github.com/beeware/std-nslog/pulls).