{ "info": { "author": "Frank Wiles", "author_email": "frank@revsys.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: System :: Logging" ], "description": "===============\nspectrum-python\n===============\n\nOverview\n========\n\n`Spectrum `_ is a application that helps\ndevelopers filter and sift through logs while developing or debugging\nlocally. It accepts logging information via a REST API, syslog, or can be\nset to tail local files. All of these logging sources are then easily\nshown or hidden depending on the current needs of the developer.\n\nThis Python package makes it trivially easy to push logs from Python and/or Django into Spectrum.\n\nPython\n======\n\nInstalling Python support for Spectrum is as easy as::\n\n $ pip install spectrum-python\n\nSetting up a logging handler is also equally easy::\n\n import logging\n from spectrum.handlers import Spectrum\n\n logger = logging.getLogger(__name__)\n logger.setLevel(logging.DEBUG)\n\n spectrum = Spectrum('my-logging-sublevel')\n logger.addHandler(spectrum)\n\n for i in range(5):\n logger.info(\"This would be sent as INFO.my-logging-sublevel\")\n logger.warn(\"This would be sent as WARNING.my-logging-sublevel\")\n logger.debug(\"This would be sent as DEBUG.my-logging-sublevel\")\n\nOptions\n-------\n\nurl\n~~~\n\nIP and PORT of the REST API to use. Defaults to 'http://0.0.0.0:9000'. You must override this to the proper Spectrum port associated to your stream if using more than one REST API Stream\n\nsublevel\n~~~~~~~~\n\nOptional sub-level to use for this handler. Defaults to '' in the Spectrum UI if not given.\n\n\nDjango\n======\n\nTo direct all logging from your Django project to Spectrum, you can use the\npredefined `FIRE_HOSE` logging configuration in your settings::\n\n # settings.py\n\n from spectrum.django import FIRE_HOSE\n LOGGING = FIRE_HOSE\n\nIf you use `celery`, you'll have one more setting to add::\n\n CELERYD_HIJACK_ROOT_LOGGER = False\n\nYou can also use the ``fire_hose`` convenience method to quickly modify any of\nthe pre-built logging configuration dict::\n\n from spectrum.django import fire_hose\n\n\n LOGGING = fire_hose()\n\n LOGGING = fire_hose(log_db=False)\n\n LOGGING = fire_hose(levels=(\n ('my.overly.verbose.module', 'WARNING'),\n ('some.other.module', 'CRITICAL'),\n )\n\n LOGGING = fire_hose(handler_kwargs={'url': '127.0.0.1:12345'})\n\nIf you prefer a more granular approach, you can configure specific handlers::\n\n # settings.py\n\n LOGGING = {\n ...\n 'filters': {\n 'request_id': {\n '()': 'spectrum.filters.RequestIdFilter'\n }\n },\n 'handlers': {\n 'myloggername': {\n 'level': 'DEBUG',\n 'class': 'spectrum.handlers.RestSpectrum',\n 'sublevel': 'myloggername',\n 'filters': ['request_id']\n }\n }\n }\n\nMake sure you include the ``request_id`` filter to filter out spectrum's own requests from the other. Otherwise, Spectrum's requests will be logged by Python, and those logs will in turn generate their own Spectrum request, causing and infinite recursion.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SpectrumApp/spectrum-python/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "spectrum-python", "package_url": "https://pypi.org/project/spectrum-python/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/spectrum-python/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SpectrumApp/spectrum-python/" }, "release_url": "https://pypi.org/project/spectrum-python/0.9.8/", "requires_dist": null, "requires_python": null, "summary": "spectrum-python is a Python Logging Handler for Spectrum (devspectrum.com)", "version": "0.9.8" }, "last_serial": 2081402, "releases": { "0.9.5": [ { "comment_text": "", "digests": { "md5": "dca567b1970ef6410ada33ddf9f0061a", "sha256": "e1b0139232f769f1a8f1be49081271d56a1dec760f7f13d7e3ecb2267d592c63" }, "downloads": -1, "filename": "spectrum-python-0.9.5.tar.gz", "has_sig": false, "md5_digest": "dca567b1970ef6410ada33ddf9f0061a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4599, "upload_time": "2015-12-16T21:24:49", "url": "https://files.pythonhosted.org/packages/39/71/8767987c509ee68d9ff9e6a8b2d0091373bca584b90dc2ea516983388461/spectrum-python-0.9.5.tar.gz" } ], "0.9.6": [ { "comment_text": "", "digests": { "md5": "9049e50ad08413aa6ad9545c677e33fb", "sha256": "bb1ce2c24d3b387beda9c296c962859b78a29565b51619b9a387f5ea8e4e106d" }, "downloads": -1, "filename": "spectrum-python-0.9.6.tar.gz", "has_sig": false, "md5_digest": "9049e50ad08413aa6ad9545c677e33fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6992, "upload_time": "2015-12-18T20:36:35", "url": "https://files.pythonhosted.org/packages/d2/d5/cca69e74771ffabd979408b1ad3628660f2a479aef55751014a19c85fcca/spectrum-python-0.9.6.tar.gz" } ], "0.9.8": [ { "comment_text": "", "digests": { "md5": "458029d7a8461d15badf6f14ad8b754e", "sha256": "6858ac46b2a11533e247d3636435779fbb0bf69bcb1c3f88cb524101548ac2dd" }, "downloads": -1, "filename": "spectrum-python-0.9.8.tar.gz", "has_sig": false, "md5_digest": "458029d7a8461d15badf6f14ad8b754e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2016-04-24T16:42:51", "url": "https://files.pythonhosted.org/packages/b2/eb/4d32e1e06fc76f40606533a4397076fa329b229b63d157ae5a5e7619a800/spectrum-python-0.9.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "458029d7a8461d15badf6f14ad8b754e", "sha256": "6858ac46b2a11533e247d3636435779fbb0bf69bcb1c3f88cb524101548ac2dd" }, "downloads": -1, "filename": "spectrum-python-0.9.8.tar.gz", "has_sig": false, "md5_digest": "458029d7a8461d15badf6f14ad8b754e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2016-04-24T16:42:51", "url": "https://files.pythonhosted.org/packages/b2/eb/4d32e1e06fc76f40606533a4397076fa329b229b63d157ae5a5e7619a800/spectrum-python-0.9.8.tar.gz" } ] }