This package defines a [wrapper class](src/main/python/streamtologger/logger_adapter.py#L38) whose instances pretend to be streams, but forward every write to a logger. A common scenario where this is useful is when we want to redirect all of an application’s output, e.g., via print or due to any errors that occur, to a file (in addition to the usual printing to the screen). To handle this most important use case, the package provides a [convenience function](src/main/python/streamtologger/__init__.py#L44) that redirects both stdout and stderr to a file, i.e., you don’t even have to create any wrapper by yourself. Just add the following lines to your code: `python import streamtologger streamtologger.redirect() ` Have a look at the provided [example](examples/test.py) in order to try it by yourself. It really is that easy ;)
Metadata
Release files for streamtologger 2017.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamtologger-2017.1.tar.gz | 4.5 kB | Without provenance | Details for streamtologger-2017.1.tar.gz |
Release files / streamtologger-2017.1.tar.gz
| Download URL | streamtologger-2017.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9db48302a95caf0ca3708fa485c3a9c7eb0c5862ccab21fd1c1ddce10d61729d
|
|
BLAKE2b-256 checksum How to use checksums |
184b253a7bb442f70855f74c39e948da3b8a83027736a7e6b9d4cdb3b85627df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for streamtologger 2017.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.