{ "info": { "author": "Romain DA COSTA VIEIRA", "author_email": "romain.da-costa-vieira@itsfactory.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.10", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=============================\nFrame Logging\n=============================\n\n.. image:: https://badge.fury.io/py/frame_logging.svg\n :target: https://badge.fury.io/py/frame_logging\n\n.. image:: https://travis-ci.org/ItsfBisounours/frame_logging.svg?branch=master\n :target: https://travis-ci.org/ItsfBisounours/frame_logging\n\n.. image:: https://codecov.io/gh/ItsfBisounours/frame_logging/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/ItsfBisounours/frame_logging\n\nYour project description goes here\n\nDocumentation\n-------------\n\nThe full documentation is at https://frame_logging.readthedocs.io.\n\nQuickstart\n----------\n\n1. Install Frame Logging::\n\n pip install frame_logging\n\n2. Add it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'frame_logging.apps.FrameLoggingConfig',\n ...\n )\n\n3. Create a class to format your extra logging kwargs \n\n.. code-block:: python\n\n # \n\n class FrameFormatterExample(FrameFormatter):\n \n # format methods\n \n @classmethod\n def get_format_behaviour(cls):\n return OrderedDict([\n ('customer_id', cls.format_customer_id),\n ])\n \n @classmethod\n def format_customer_id(cls, customer_id):\n return \"customer_id={}\".format(customer_id)\n \n # then if you need to, you can add new method to transform extra kwargs\n # transform methods\n \n @classmethod\n def get_transform_kwargs_methods(cls):\n return {\n 'order': cls.transform_order,\n }\n \n @classmethod\n def transform_order(cls, order, **kwargs):\n kwargs['customer_id'] = order.customer['id']\n return kwargs\n\n\n4. Configure frame loggin in your settings.py\n\n.. code-block:: python\n\n # mandatory, if you do not priovide a formatter the app will crash\n FRAME_FORMATTER=FrameFormatterExample()\n\n # optionnal, default = ' - '\n FRAME_SEPARATOR='+'\n\n\n5. Use it:\n\n.. code-block:: python\n\n import frame_logging.log as log\n\n class Order(object):\n def __init__(self):\n self.customer = {'id': 1}\n\n log.info('Renewed contract %s', 'test', order=order)\n # 'Renewed contract test - customer_id=1'))\n\n\n\nFeatures\n--------\n\n* TODO\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n source /bin/activate\n (myenv) $ pip install tox\n (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.1.0 (2017-10-26)\n++++++++++++++++++\n\n* First release on PyPI.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ItsfBisounours/frame_logging", "keywords": "frame_logging", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "frame_logging", "package_url": "https://pypi.org/project/frame_logging/", "platform": "", "project_url": "https://pypi.org/project/frame_logging/", "project_urls": { "Homepage": "https://github.com/ItsfBisounours/frame_logging" }, "release_url": "https://pypi.org/project/frame_logging/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Your project description goes here", "version": "0.2.1" }, "last_serial": 3283745, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "0dcc695b08fe46be568e90eacf8c2efb", "sha256": "70324040a5ca0f2216616dc792d2c0190ed718e2e7efd1c4a465895ce64daac1" }, "downloads": -1, "filename": "frame_logging-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0dcc695b08fe46be568e90eacf8c2efb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7086, "upload_time": "2017-10-27T13:29:23", "url": "https://files.pythonhosted.org/packages/c9/df/7f4555cebfbcb369b0e55b37bdb8730748cfd075ab573455645f9478c129/frame_logging-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e78d19de2364462bc785080e4993c36c", "sha256": "cbdc081e9110dc3ad93e89a9d5ba4420a1ba19392f5b68d1d98244708706a81b" }, "downloads": -1, "filename": "frame_logging-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e78d19de2364462bc785080e4993c36c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6923, "upload_time": "2017-10-27T13:29:18", "url": "https://files.pythonhosted.org/packages/cd/25/aa8b559054f72f19d7e12a7373108e8de149fe08eb0f3a792fcef088a4d8/frame_logging-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "89be9097f66812e317924818edf3814d", "sha256": "69c701e8862be9d9977cfe9eefa7020795791360605ad7906fe7389c65f5a3ae" }, "downloads": -1, "filename": "frame_logging-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89be9097f66812e317924818edf3814d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7087, "upload_time": "2017-10-27T13:36:57", "url": "https://files.pythonhosted.org/packages/38/7d/43e6a00e443e0595609562a7dcf689450371ae0d76a2fdc15d8723a7c3fe/frame_logging-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "556391696e5a0a08f76e4cdb4ae30be7", "sha256": "7bb97faf0da1535a44dcd6ae29d5a4e91177642b0d673da11904f6ea442ec97f" }, "downloads": -1, "filename": "frame_logging-0.2.1.tar.gz", "has_sig": false, "md5_digest": "556391696e5a0a08f76e4cdb4ae30be7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6936, "upload_time": "2017-10-27T13:36:55", "url": "https://files.pythonhosted.org/packages/4b/8b/e60c1c7aaa8475ee33227c02f472500e739bc5a9bbe60978e70d511de90b/frame_logging-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89be9097f66812e317924818edf3814d", "sha256": "69c701e8862be9d9977cfe9eefa7020795791360605ad7906fe7389c65f5a3ae" }, "downloads": -1, "filename": "frame_logging-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89be9097f66812e317924818edf3814d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7087, "upload_time": "2017-10-27T13:36:57", "url": "https://files.pythonhosted.org/packages/38/7d/43e6a00e443e0595609562a7dcf689450371ae0d76a2fdc15d8723a7c3fe/frame_logging-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "556391696e5a0a08f76e4cdb4ae30be7", "sha256": "7bb97faf0da1535a44dcd6ae29d5a4e91177642b0d673da11904f6ea442ec97f" }, "downloads": -1, "filename": "frame_logging-0.2.1.tar.gz", "has_sig": false, "md5_digest": "556391696e5a0a08f76e4cdb4ae30be7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6936, "upload_time": "2017-10-27T13:36:55", "url": "https://files.pythonhosted.org/packages/4b/8b/e60c1c7aaa8475ee33227c02f472500e739bc5a9bbe60978e70d511de90b/frame_logging-0.2.1.tar.gz" } ] }