{ "info": { "author": "Patrick Hohenecker", "author_email": "mail@paho.at", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "stream-to-logger\n================\n\nThis 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:\n```python\nimport streamtologger\nstreamtologger.redirect()\n```\nHave a look at the provided [example](examples/test.py) in order to try it by yourself. It really is that easy ;)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/phohenecker/stream-to-logger/archive/v2017.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/phohenecker/stream-to-logger", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "streamtologger", "package_url": "https://pypi.org/project/streamtologger/", "platform": "", "project_url": "https://pypi.org/project/streamtologger/", "project_urls": { "Download": "https://github.com/phohenecker/stream-to-logger/archive/v2017.1.tar.gz", "Homepage": "https://github.com/phohenecker/stream-to-logger" }, "release_url": "https://pypi.org/project/streamtologger/2017.1/", "requires_dist": null, "requires_python": "", "summary": "A package for redirecting stdout/stderr to a file.", "version": "2017.1" }, "last_serial": 3341998, "releases": { "2017.1": [ { "comment_text": "", "digests": { "md5": "b1d56ecef514365c76b75d2568c17c3c", "sha256": "9db48302a95caf0ca3708fa485c3a9c7eb0c5862ccab21fd1c1ddce10d61729d" }, "downloads": -1, "filename": "streamtologger-2017.1.tar.gz", "has_sig": false, "md5_digest": "b1d56ecef514365c76b75d2568c17c3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4458, "upload_time": "2017-11-17T17:17:31", "url": "https://files.pythonhosted.org/packages/18/4b/253a7bb442f70855f74c39e948da3b8a83027736a7e6b9d4cdb3b85627df/streamtologger-2017.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1d56ecef514365c76b75d2568c17c3c", "sha256": "9db48302a95caf0ca3708fa485c3a9c7eb0c5862ccab21fd1c1ddce10d61729d" }, "downloads": -1, "filename": "streamtologger-2017.1.tar.gz", "has_sig": false, "md5_digest": "b1d56ecef514365c76b75d2568c17c3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4458, "upload_time": "2017-11-17T17:17:31", "url": "https://files.pythonhosted.org/packages/18/4b/253a7bb442f70855f74c39e948da3b8a83027736a7e6b9d4cdb3b85627df/streamtologger-2017.1.tar.gz" } ] }