{ "info": { "author": "Darius BERNARD", "author_email": "darius@yupeek.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "=====================\ndjango-dynamic-loging\n=====================\n\nallow to change the logging configuration for running production website from the admin interface.\n\nall you need to do is :\n\n1. create a logging config [Config model] from a use friendly form\n2. create a timelaps [Trigger model] in which your config is valid (from start_date to end_date, or forever)\n3. enjoy your logging, since you saved the trigger, the app will do the stuff to run it now if it's already\n valide, or at the date/time you enabled it\n\n\nstable branche\n\n.. image:: https://img.shields.io/travis/Yupeek/django-dynamic-logging/master.svg\n :target: https://travis-ci.org/Yupeek/django-dynamic-logging\n\n.. image:: https://readthedocs.org/projects/django-dynamic-logging/badge/?version=latest\n :target: http://django-dynamic-logging.readthedocs.org/en/latest/\n\n.. image:: https://coveralls.io/repos/github/Yupeek/django-dynamic-logging/badge.svg?branch=master\n :target: https://coveralls.io/github/Yupeek/django-dynamic-logging?branch=master\n\n.. image:: https://img.shields.io/pypi/v/django-dynamic-logging.svg\n :target: https://pypi.python.org/pypi/django-dynamic-logging\n :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/dm/django-dynamic-logging.svg\n :target: https://pypi.python.org/pypi/django-dynamic-logging\n :alt: Number of PyPI downloads per month\n\n.. image:: https://requires.io/github/Yupeek/django-dynamic-logging/requirements.svg?branch=master\n :target: https://requires.io/github/Yupeek/django-dynamic-logging/requirements/?branch=master\n :alt: Requirements Status\n\ndevelopment status\n\n.. image:: https://img.shields.io/travis/Yupeek/django-dynamic-logging/develop.svg\n :target: https://travis-ci.org/Yupeek/django-dynamic-logging\n\n.. image:: https://coveralls.io/repos/github/Yupeek/django-dynamic-logging/badge.svg?branch=develop\n :target: https://coveralls.io/github/Yupeek/django-dynamic-logging?branch=develop\n\n.. image:: https://requires.io/github/Yupeek/django-dynamic-logging/requirements.svg?branch=develop\n :target: https://requires.io/github/Yupeek/django-dynamic-logging/requirements/?branch=develop\n :alt: Requirements Status\n\n\nthe old way was :\n\nyou found a bug, and the current stacktrace is not enough ? first, you should\nchange the settings LOGGING to make it more verbose (with something like LEVEL: 'DEBUG')\n\nbut, the bad thing, is that you must:\n1. connect to your production server\n2. change the settings in live\n3. make sure no synthax error\n4. restart the service (with downtime)\n5. do not forget to rollback after some time to prevent performance issues.\n\n\n\n\nOverview\n--------\n\n\nwith django-dynamic-logging, you can update at runtime the logging configuration, including :\n\n- update handlers levels and filter, but nothing else (for security purpose)\n- create/delete/update loggers. this include the level, handlers, filters and propagate flag.\n\nmay logging configuration can exists in the database, but only one can be active. the leatest trigger (start_date) take\nprecedence and will activate his config.\n\nie: you want to set the app \u00abmyproject.import\u00bb in debug mode to for this night: you set the trigger, and it will\nenable the debug only for this night. at day, the default logging config will run\n\n**screenshots**\n\n.. image:: https://github.com/Yupeek/django-dynamic-logging/raw/develop/testproject/static/screenshot/DL_home.png\n :alt: home\n\n.. image:: https://github.com/Yupeek/django-dynamic-logging/raw/develop/testproject/static/screenshot/create_config.png\n :alt: home\n\n\nInstallation\n------------\n\n1. Install using pip:\n\n ``pip install django-dynamic-logging``\n\n2. Alternatively, you can install download or clone this repo and call\n\n ``pip install -e .``.\n\nrequirements\n------------\n\nthe supported versions is the same as current django\n\n- python 2.7, 3.4, 3.5\n- django 1.8, 1.9, 1.10\n\nconfiguration in sources\n------------------------\n\n1. add `dynamic-logging` to your INSTALLED_APPS\n\nand that's all\n\nconfiguration for running system\n--------------------------------\n\n1. go to your admin, and create a Config\n2. create the Trigger that will enable it whenever you want.\n\n\n.. _propagation:\n\npropagation of new config\n-------------------------\n\neach time a config or trigger is updated/deleted/created, the dynamic_logging system must recalculate the new config.\nbut to work, it must be aware of the fact the something was updated. to make it available, there is 3 possibility.\nin mono-processing, where the logging config is global to all thread, it's not a issues, but in multi-process (like with\ngunicorn setup) or even multi-server, we must propagate the info that one running instance has just changed something in\nthe config.\n\nfor doing this, there is 4 Propagator shiped with dynamic_logging:\n\n- ``ThreadSignalPropagator``: the default one, it work in real-time in a mono-server, mono-process setup. it may not be possible\n in real production to have this setup.\n- ``DummyPropagator``: nothing happen whene a config is updated. all the triggers and next trigger application is computed only\n at startup time\n- ``TimerPropagator``: it check a modification in the config each `interval` seconds. this work, but is ineficient.\n- ``AmqpPropagator``: the best choice for production, but it require a running Amqp message queue broker (tested upon RabbitMQ).\n it take in config the url of the server, and will connect each running instance to it. each time an instance update the config,\n all instance will be triggered and will reload theire config in near realtime.\n\nthe ``on_error`` config can be used to ``raise`` if the propagator fail tu setup or ``pass``[default] but log an error in\n``dynamic_logging.apps``\n\nto change the propagator, you can use the folowing settings:\n\n.. code-block:: python\n\n DYNAMIC_LOGGING = {\n \"upgrade_propagator\": {'class': \"dynamic_logging.propagator.AmqpPropagator\",\n 'config': {'url': 'amqp://guest:guest@localhost:5672/%2F'},\n 'on_error': 'raise', # or by default : 'pass'\n }\n }\n\nspecials cases\n--------------\n\ndjango-dynamic-logging handle some specials cases for you by default.\n\n- if you update a config or a trigger it will compute the current config and the next one on all running\n instance of your website (see propagation_)\n\n- if you enable the DEBUG (or lesser) level on django.db.backends, it will change the settings of your\n databases connection to make sure the CursorDebugWrapper is used and will call the debug for all query.\n if not, you will not see any query by default.\n\nyou can override or add some special cases by adding your own special cases in\n`dynamic_logging.signals.AutoSignalsHandler.extra_signals`.\n\nsettings\n--------\n\nyou can add into your settings a DYNAMIC_LOGGING dict with the folowing key to customise the dynamic logger behavior\n\n- signals_auto: the list of special logging handlers. currently only db_debug is enabled\n- config_upgrade_propagator: the class that is charged to trigger a scheduler reload for all running instances of the website.\n see propagation_\n\n\nwhat's next ?\n-------------\n\n\nsome of the next feature can be:\n\n- live logging browser (via websocket)\n- push/pull configuration from/to othes servers (via amqp)\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/Yupeek/django-dynamic-logging", "keywords": "django logging dynamic handlers logger", "license": "GNU GENERAL PUBLIC LICENSE", "maintainer": "", "maintainer_email": "", "name": "django-dynamic-logging", "package_url": "https://pypi.org/project/django-dynamic-logging/", "platform": "", "project_url": "https://pypi.org/project/django-dynamic-logging/", "project_urls": { "Homepage": "https://github.com/Yupeek/django-dynamic-logging" }, "release_url": "https://pypi.org/project/django-dynamic-logging/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "django app to manager logging in runtime system", "version": "1.0.3" }, "last_serial": 2673219, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2bfc3194f3b01b3b9cb0c4c6834a552f", "sha256": "202b165f15bc0ee6f56f82ac40ab9971c6c6456cbf0bbf0f91df4a24d536411f" }, "downloads": -1, "filename": "django_dynamic_logging-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2bfc3194f3b01b3b9cb0c4c6834a552f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 136776, "upload_time": "2017-02-14T14:01:37", "url": "https://files.pythonhosted.org/packages/21/b9/833a413e9d45c82829adad73dd92ab81c2d718a45e9ff88d73a1ff47b4f5/django_dynamic_logging-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "012c3867ae4ed87b1ceabb613b9ef025", "sha256": "0ca4230b5b4a13c84b5f8b0408ea84c7ffa321dc3e10ec069e77e67823e2d770" }, "downloads": -1, "filename": "django-dynamic-logging-1.0.0.tar.gz", "has_sig": false, "md5_digest": "012c3867ae4ed87b1ceabb613b9ef025", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148019, "upload_time": "2017-02-14T14:01:34", "url": "https://files.pythonhosted.org/packages/37/ad/d89206a2b88267086fcc0d2e2cfb89eb5f1b3160507334c8a023b75f1c88/django-dynamic-logging-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "3e32674ac6a5c514bd140b4985b39176", "sha256": "a3189513717846aa61093518beca886c9919c1b278e57bac048ad5cb8885dc6a" }, "downloads": -1, "filename": "django_dynamic_logging-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3e32674ac6a5c514bd140b4985b39176", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 137058, "upload_time": "2017-02-22T16:09:02", "url": "https://files.pythonhosted.org/packages/21/6b/29a76b972dc555e712ecea15bd673bd2fb562e83766aba6d6436e9a80f01/django_dynamic_logging-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3aaacd6212aeb8ff619cd5e16bad71e", "sha256": "13df1c8d466e00496e4e3b4507f23898cbf9d9fa7c8719ce558e4cb17f36b577" }, "downloads": -1, "filename": "django-dynamic-logging-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e3aaacd6212aeb8ff619cd5e16bad71e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148382, "upload_time": "2017-02-22T16:09:00", "url": "https://files.pythonhosted.org/packages/7b/ae/71fa20d5f3f7d6902772759270325561bc879b8a361cba71f35156ac526e/django-dynamic-logging-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "64b73c2e6bff0cec1a417f5f3adfe7dc", "sha256": "411bee273524ddb6dd7dbc8c2733028915abfeee57e534cbdc4b39ef2d4baa28" }, "downloads": -1, "filename": "django_dynamic_logging-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "64b73c2e6bff0cec1a417f5f3adfe7dc", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 137113, "upload_time": "2017-02-27T14:45:17", "url": "https://files.pythonhosted.org/packages/a9/57/21f2969cf730b9bacfe8c32c815247dcb91deb846b85a586b22e340ed9ad/django_dynamic_logging-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "287a4abca47ddebc5c61d85e44593884", "sha256": "f3acdce52e50f6f1264da92be9547dbab117b9b76a4210905d84435248393685" }, "downloads": -1, "filename": "django-dynamic-logging-1.0.2.tar.gz", "has_sig": false, "md5_digest": "287a4abca47ddebc5c61d85e44593884", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148462, "upload_time": "2017-02-27T14:45:14", "url": "https://files.pythonhosted.org/packages/a1/e5/1a3cb925e6bb43c4b3c641f2d3b2db4f67c6922d121795554be15897cc4d/django-dynamic-logging-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "a1f7a2ad7b6252bf78cb2af424c237b3", "sha256": "4a4d141e7ac2aaad15ce8a5e12dcb33eac23a3e6676fd3a9f0baaa61c56a5d1f" }, "downloads": -1, "filename": "django_dynamic_logging-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a1f7a2ad7b6252bf78cb2af424c237b3", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 137328, "upload_time": "2017-02-28T13:48:32", "url": "https://files.pythonhosted.org/packages/de/4f/bf0d6f607030484a17271e6a070636593226c404eed5e73cdf6e3b95af62/django_dynamic_logging-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "023a5446e5a4d373d0d9adcd57b8041e", "sha256": "eba4f47d78c2e76b7cb0f5f2aaf5119e731fd70bfd7c77212fa99927e2535409" }, "downloads": -1, "filename": "django-dynamic-logging-1.0.3.tar.gz", "has_sig": false, "md5_digest": "023a5446e5a4d373d0d9adcd57b8041e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148702, "upload_time": "2017-02-28T13:48:30", "url": "https://files.pythonhosted.org/packages/e4/fa/02880a7ede98e42a1459c4413924c954feb1ff6261258feffbe10daae283/django-dynamic-logging-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1f7a2ad7b6252bf78cb2af424c237b3", "sha256": "4a4d141e7ac2aaad15ce8a5e12dcb33eac23a3e6676fd3a9f0baaa61c56a5d1f" }, "downloads": -1, "filename": "django_dynamic_logging-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a1f7a2ad7b6252bf78cb2af424c237b3", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 137328, "upload_time": "2017-02-28T13:48:32", "url": "https://files.pythonhosted.org/packages/de/4f/bf0d6f607030484a17271e6a070636593226c404eed5e73cdf6e3b95af62/django_dynamic_logging-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "023a5446e5a4d373d0d9adcd57b8041e", "sha256": "eba4f47d78c2e76b7cb0f5f2aaf5119e731fd70bfd7c77212fa99927e2535409" }, "downloads": -1, "filename": "django-dynamic-logging-1.0.3.tar.gz", "has_sig": false, "md5_digest": "023a5446e5a4d373d0d9adcd57b8041e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148702, "upload_time": "2017-02-28T13:48:30", "url": "https://files.pythonhosted.org/packages/e4/fa/02880a7ede98e42a1459c4413924c954feb1ff6261258feffbe10daae283/django-dynamic-logging-1.0.3.tar.gz" } ] }