{ "info": { "author": "Joep Schuurkes", "author_email": "j19sch@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing" ], "description": "==============\npytest-logfest\n==============\n\n.. image:: https://img.shields.io/pypi/v/pytest-logfest.svg\n :target: https://pypi.org/project/pytest-logfest\n :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-logfest.svg\n :target: https://pypi.org/project/pytest-logfest\n :alt: Python versions\n\n.. image:: https://travis-ci.org/j19sch/pytest-logfest.svg?branch=master\n :target: https://travis-ci.org/j19sch/pytest-logfest\n :alt: See Build Status on Travis CI\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/j19sch/pytest-logfest?branch=master\n :target: https://ci.appveyor.com/project/j19sch/pytest-logfest/branch/master\n :alt: See Build Status on AppVeyor\n\n.. image:: https://img.shields.io/github/license/mashape/apistatus.svg\n :target: https://github.com/j19sch/pytest-logfest/blob/master/LICENSE\n :alt: MIT license\n\nPytest plugin providing three logger fixtures with basic or full writing to log files\n\n----\n\n\nFeatures\n--------\n\nThree logger fixtures, one of each scope: session, module and function.\n\nThree options for writing log records to file: quiet, basic, full.\n\n\n\nRequirements\n------------\n\n* Pytest\n* Pathlib2 (if using Python 2.7)\n\n\n\nInstallation\n------------\n\nYou can install \"pytest-logfest\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-logfest\n\n\n\nUsage\n-----\n\nFixtures\n~~~~~~~~\nThe three logger fixtures exposed by this plugin are:\n\n- ``session_logger``\n- ``module_logger``\n- ``function_logger``\n\nThey expose a Python ``Logger`` object, so you can use them as such, e.g. ``session_logger.INFO(\"This is a log record of level INFO.\")``\nThe log nodes of these loggers match the path to the corresponding location or file.\n\nPytest's ``--log-cli-level=`` will display these log records on stdout.\n\n\nLog filenames\n~~~~~~~~~~~~~\nWriting the log records of the loggers to file can be controlled by the ``--logfest`` command-line option:\n\n- ``--logfest=quiet`` or option omitted: no log files are written.\n- ``--logfest=basic``: one log file containing INFO and higher for passed tests, DEBUG and higher for setup errors or failed tests.\n- ``--logfest=full``: in addition to the basic log file, all log records are written to a session log file and one log file per module.\n\nLog file names and locations are as follows (directories will be created if needed):\n\n- basic log file in ``./artifacts``: ``session-.log``\n- session-level full log file in ``./artifacts``: ``-.log``\n- module-level full log file in ``./artifacts/``: ``-.log``\n\n``logfest-root-node`` can be set in ``pytest.ini`` (see below). You can change the compostion of file names through hooks (see below).\n\n\npytest.ini\n~~~~~~~~~~\nThe following values in ``pytest.ini`` are relevant to this plugin:\n\n- ``logfest-root-node``: name used as root log node and in log filenames; if not set, defaults to the session's ``request.node.name``.\n- ``log-level``: should be set to ``info`` or lower, so pytest captures all relevant log records.\n- ``log-format``: the default format is not very convenient in combination with this plugin, suggestion: ``%(name)s - %(levelname)s - %(message)s``\n\n\nHooks\n~~~~~\nThere are three hooks to change the components of the log filenames:\n\n- ``pytest_logfest_log_file_name_basic``\n- ``pytest_logfest_log_file_name_full_session``\n- ``pytest_logfest_log_file_name_full_module``\n\nThe expose a list that will be joined with the separator character ``-`` and appended with ``.log``.\n\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\ngood test coverage before you submit a pull request.\n\n\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-logfest\" is free and open source software.\n\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n\n\nAcknowledgements\n----------------\nThis `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `cookiecutter-pytest-plugin`_ template.\n\nThanks to my employer `Mendix`_, for the crafting days in which I worked on this plugin, and for the permission to open-source it.\n\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/j19sch/pytest-logfest/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`PyPI`: https://pypi.org/project\n.. _`Mendix`: https://www.mendix.com\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/j19sch/pytest-logfest", "keywords": "", "license": "MIT", "maintainer": "Joep Schuurkes", "maintainer_email": "j19sch@gmail.com", "name": "pytest-logfest", "package_url": "https://pypi.org/project/pytest-logfest/", "platform": "", "project_url": "https://pypi.org/project/pytest-logfest/", "project_urls": { "Homepage": "https://github.com/j19sch/pytest-logfest" }, "release_url": "https://pypi.org/project/pytest-logfest/0.3.0/", "requires_dist": [ "pytest (>=3.5.0)", "pathlib2" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Pytest plugin providing three logger fixtures with basic or full writing to log files", "version": "0.3.0" }, "last_serial": 5563784, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7b91d4f0672ac96f1450085cc747f92d", "sha256": "e69f66d45a3f8f398885ba57873f5686c2a3c07c57baff9b94e3b4a4b907b698" }, "downloads": -1, "filename": "pytest-logfest-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7b91d4f0672ac96f1450085cc747f92d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5416, "upload_time": "2018-04-15T17:51:34", "url": "https://files.pythonhosted.org/packages/f1/a5/341f2614fe60d49df111130838db9e4b4249aa7fceb0ed670262f343c52c/pytest-logfest-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1b3cf13e3c8d2b3a1f5c622bc299f020", "sha256": "f6a8a34973f02edd99f62739ed40398717e6e493ad56473a54a4eea9f6c6184c" }, "downloads": -1, "filename": "pytest_logfest-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "1b3cf13e3c8d2b3a1f5c622bc299f020", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9191, "upload_time": "2018-04-29T14:30:08", "url": "https://files.pythonhosted.org/packages/00/6d/5e0ff202abd173b9e42d3f3d300a0187c708e89c88c414fecc39e9e6d7a1/pytest_logfest-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c916a812549bb642a9f660f23700f1c2", "sha256": "e1ea956284b9a5c6ca02545ea65870d7cbd8159e9b67b4d563dcc9ce94417a11" }, "downloads": -1, "filename": "pytest-logfest-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c916a812549bb642a9f660f23700f1c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6350, "upload_time": "2018-04-29T14:30:10", "url": "https://files.pythonhosted.org/packages/f4/40/828cf395349a665494562a77e73b88042af8c8b7fcfbb1a59ba70d781509/pytest-logfest-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6ac4aea035a94704b0c0b2498731e321", "sha256": "7322a3e16deb06a83050e9c3d839ddde66d17ca2d89d8417f89916f2dc9831aa" }, "downloads": -1, "filename": "pytest_logfest-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "6ac4aea035a94704b0c0b2498731e321", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9521, "upload_time": "2019-07-21T16:07:00", "url": "https://files.pythonhosted.org/packages/08/98/ac69cff0df0a113e587deed57b9fe434df211546e7420d58242a85835708/pytest_logfest-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "923f673a5617f10d7d366a22c8ff83d4", "sha256": "5534ba712ac253f64a5499e2e67db736611c242162999205d917eb23cb5efa64" }, "downloads": -1, "filename": "pytest_logfest-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "923f673a5617f10d7d366a22c8ff83d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9521, "upload_time": "2019-07-21T16:07:02", "url": "https://files.pythonhosted.org/packages/5c/7c/08247d553287fe70016363a3e38df26321f3610fe817c7ff58d0cfae2282/pytest_logfest-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a2abda154677bc35da3f56d09b0a598", "sha256": "71ca50517c523fbbc81728b1353afd58703d1b894bbc63aeb77f4ee45b38728a" }, "downloads": -1, "filename": "pytest-logfest-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8a2abda154677bc35da3f56d09b0a598", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6699, "upload_time": "2019-07-21T16:07:04", "url": "https://files.pythonhosted.org/packages/ba/ea/684417ca2536a50fa1491b5b812091cea8548c98f69c5b9e29616e033356/pytest-logfest-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ac4aea035a94704b0c0b2498731e321", "sha256": "7322a3e16deb06a83050e9c3d839ddde66d17ca2d89d8417f89916f2dc9831aa" }, "downloads": -1, "filename": "pytest_logfest-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "6ac4aea035a94704b0c0b2498731e321", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9521, "upload_time": "2019-07-21T16:07:00", "url": "https://files.pythonhosted.org/packages/08/98/ac69cff0df0a113e587deed57b9fe434df211546e7420d58242a85835708/pytest_logfest-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "923f673a5617f10d7d366a22c8ff83d4", "sha256": "5534ba712ac253f64a5499e2e67db736611c242162999205d917eb23cb5efa64" }, "downloads": -1, "filename": "pytest_logfest-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "923f673a5617f10d7d366a22c8ff83d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9521, "upload_time": "2019-07-21T16:07:02", "url": "https://files.pythonhosted.org/packages/5c/7c/08247d553287fe70016363a3e38df26321f3610fe817c7ff58d0cfae2282/pytest_logfest-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a2abda154677bc35da3f56d09b0a598", "sha256": "71ca50517c523fbbc81728b1353afd58703d1b894bbc63aeb77f4ee45b38728a" }, "downloads": -1, "filename": "pytest-logfest-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8a2abda154677bc35da3f56d09b0a598", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 6699, "upload_time": "2019-07-21T16:07:04", "url": "https://files.pythonhosted.org/packages/ba/ea/684417ca2536a50fa1491b5b812091cea8548c98f69c5b9e29616e033356/pytest-logfest-0.3.0.tar.gz" } ] }