{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. -*- mode: rst -*-\n\nlogging-fortified\n-----------------\n\nThis Python project is an extension of the native Python component `logging `_\nproviding more robust message formatting for standard and JSON logging output, and in addtion allowing for extra\ncontent populated as dictionaries.\n\nImportant Note\n^^^^^^^^^^^^^^\n\nThis Python project is a refactoring of `logging-mv-integrations `_\nfor the purpose of general usage intent.\n\nWork In Progress\n^^^^^^^^^^^^^^^^\n\nThe following still needs to be performed for this Python project:\n\n- Unit-testing: This project will be switching over to using Python native Unit testing framework `unittest `_.\n- More concise documentation is required.\n- Travis CI\n- Badges\n\n\nBadges\n------\n\n.. start-badges\n\n.. list-table::\n :stub-columns: 1\n\n * - docs\n - |docs| |license|\n * - package\n - |version| |supported-versions|\n\n\n.. |docs| image:: https://readthedocs.org/projects/logging-fortified/badge/?style=flat\n :alt: Documentation Status\n :target: http://logging-fortified.readthedocs.io\n\n.. |hits| image:: http://hits.dwyl.io/jeff00seattle/logging-fortified.svg\n :alt: Hit Count\n :target: http://hits.dwyl.io/jeff00seattle/logging-fortified\n\n.. |license| image:: https://img.shields.io/badge/License-MIT-yellow.svg\n :alt: License Status\n :target: https://opensource.org/licenses/MIT\n\n.. |travis| image:: https://travis-ci.org/jeff00seattle/logging-fortified.svg?branch=master\n :alt: Travis-CI Build Status\n :target: https://travis-ci.org/jeff00seattle/logging-fortified\n\n.. |coveralls| image:: https://coveralls.io/repos/jeff00seattle/logging-fortified/badge.svg?branch=master&service=github\n :alt: Code Coverage Status\n :target: https://coveralls.io/r/jeff00seattle/logging-fortified\n\n.. |requires| image:: https://requires.io/github/jeff00seattle/logging-fortified/requirements.svg?branch=master\n :alt: Requirements Status\n :target: https://requires.io/github/jeff00seattle/logging-fortified/requirements/?branch=master\n\n.. |version| image:: https://img.shields.io/pypi/v/logging_fortified.svg?style=flat\n :alt: PyPI Package latest release\n :target: https://pypi.python.org/pypi/logging_fortified\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/logging-fortified.svg?style=flat\n :alt: Supported versions\n :target: https://pypi.python.org/pypi/logging-fortified\n\n.. end-badges\n\n\nInstall\n-------\n\n.. code-block:: bash\n\n pip install logging_fortified\n\n\nArchitecture\n------------\n\n``logging-fortified`` is an extension of the `logging facility for Python `_\nused for providing custom logger levels, format, and output.\n\n.. image:: ./images/logging_fortified.png\n :scale: 50 %\n :alt: UML logging-fortified\n\n\nFunction: get_logger()\n----------------------\n\n.. code-block:: python\n\n def get_logger(\n logger_name,\n logger_version=None,\n logger_level=logging.INFO,\n logger_format=LoggingFormat.JSON,\n logger_output=LoggingOutput.STDOUT_COLOR,\n logger_handler=None\n ):\n\n\nget_logger(): Parameters\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n| Parameter | Purpose |\n+=================+=========================================================================================================================+\n| logger_name | Return a logger with the specified name or, if name is None, return a logger which is the root logger of the hierarchy. |\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n| logger_version | |\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n| logger_format | LoggingFormat |\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n| logger_output | LoggingOutput |\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n| logger_handler | logging.StreamHandler() or logging.FileHandler() |\n+-----------------+-------------------------------------------------------------------------------------------------------------------------+\n\n\n\nLogging Levels\n^^^^^^^^^^^^^^\n\nSame Python logging levels, including one additional level NOTE.\n\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| Level | Purpose |\n+============+================================================================================================================================================+\n| DEBUG | Detailed information, typically of interest only when diagnosing problems. |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| NOTE | Detailed information, request processing, for example, request using cURL. |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| INFO | Confirmation that things are working as expected. *[DEFAULT]* |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| WARNING | An indication that something unexpected happened, or indicative of some problem in the near future. The software is still working as expected. |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| ERROR | Due to a more serious problem, the software has not been able to perform some function. |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n| CRITICAL | A serious error, indicating that the program itself may be unable to continue running. |\n+------------+------------------------------------------------------------------------------------------------------------------------------------------------+\n\n\n\nLogging Format\n^^^^^^^^^^^^^^\n\n+------------+-------------------------------------------------------------------------------------------------------+\n| Format | Purpose |\n+============+=======================================================================================================+\n| STANDARD | Standard logging format. |\n+------------+-------------------------------------------------------------------------------------------------------+\n| JSON | JSON logging format. *[DEFAULT]* |\n+------------+-------------------------------------------------------------------------------------------------------+\n\n\n.. code-block:: python\n\n class LoggingFormat(object):\n \"\"\"TUNE Logging Format ENUM\n \"\"\"\n STANDARD = \"standard\"\n JSON = \"json\"\n\n\n\nLogging Output\n^^^^^^^^^^^^^^\n\n+--------------+----------------------------------------------------------------------------------------------+\n| Output | Purpose |\n+==============+==============================================================================================+\n| STDOUT | Standard Output to terminal |\n+--------------+----------------------------------------------------------------------------------------------+\n| STDOUT_COLOR | Standard Output using colored terminal |\n+--------------+----------------------------------------------------------------------------------------------+\n| FILE | Standard Output to file created within *./tmp/log_.json*. |\n+--------------+----------------------------------------------------------------------------------------------+\n\n\n.. code-block:: python\n\n class LoggingOutput(object):\n \"\"\"Logging Format ENUM\n \"\"\"\n STDOUT = \"stdout\"\n STDOUT_COLOR = \"color\"\n FILE = \"file\"\n\n\nLogging JSON Format\n^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n import logging\n from logging_fortified import (LoggingFormat, get_logger, __version__)\n\n log = get_logger(\n logger_name=__name__,\n logger_version=__version__,\n logger_format=LoggingFormat.JSON,\n logger_level=logging.NOTE\n )\n\n log.info(\"logging: info\", extra={'test': __name__})\n log.note(\"logging: note\", extra={'test': __name__})\n log.debug(\"logging: debug\", extra={'test': __name__})\n log.warning(\"logging: warning\", extra={'test': __name__})\n log.error(\"logging: error\", extra={'test': __name__})\n log.critical(\"logging: critical\", extra={'test': __name__})\n log.exception(\"logging: exception\", extra={'test': __name__})\n\n\nLogging JSON Example Output\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n $ python3 examples/example_logging_json.py\n\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"INFO\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: info\", \"test\": \"__main__\"}\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"NOTE\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: note\", \"test\": \"__main__\"}\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"WARNING\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: warning\", \"test\": \"__main__\"}\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"ERROR\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: error\", \"test\": \"__main__\"}\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"CRITICAL\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: critical\", \"test\": \"__main__\"}\n {\"asctime\": \"2018-05-11 05:41:39 -0700\", \"levelname\": \"ERROR\", \"name\": \"__main__\",\n \"version\": \"0.1.6\", \"message\": \"logging: exception\", \"exc_info\": \"NoneType: None\",\n \"test\": \"__main__\"}\n\n\nRequirements\n------------\n\n``logging-fortified`` module is built upon Python 3 and has dependencies upon\nseveral Python modules available within `Python Package Index PyPI `_.\n\n.. code-block:: bash\n\n make install-requirements\n\nor\n\n\n.. code-block:: bash\n\n python3 -m pip uninstall --yes --no-input -r requirements.txt\n python3 -m pip install --upgrade -r requirements.txt\n\n\nDependencies\n^^^^^^^^^^^^\n\n- coloredlogs: https://pypi.python.org/pypi/coloredlogs\n- pprintpp: https://pypi.python.org/pypi/pprintpp\n- python-json-logger: https://pypi.python.org/pypi/python-json-logger\n- Pygments: https://pypi.python.org/pypi/Pygments\n- safe-cast: https://pypi.python.org/pypi/safe-cast\n- wheel: https://pypi.python.org/pypi/wheel\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/jeff00seattle/logging-fortified/archive/v0.1.5.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jeff00seattle/logging-fortified", "keywords": "logger logging fortified", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "logging-fortified", "package_url": "https://pypi.org/project/logging-fortified/", "platform": "", "project_url": "https://pypi.org/project/logging-fortified/", "project_urls": { "Download": "https://github.com/jeff00seattle/logging-fortified/archive/v0.1.5.tar.gz", "Homepage": "https://github.com/jeff00seattle/logging-fortified" }, "release_url": "https://pypi.org/project/logging-fortified/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Extension to Python `logging` functionality.", "version": "0.1.5" }, "last_serial": 3861248, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "a47ec64b1c2e4a6a6a45f315d49058a8", "sha256": "bb718d43ef2992c2aee79aaaa90bf44371c1be1d61b688c2bc02aee90f7abadf" }, "downloads": -1, "filename": "logging_fortified-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "a47ec64b1c2e4a6a6a45f315d49058a8", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13017, "upload_time": "2018-05-12T03:39:26", "url": "https://files.pythonhosted.org/packages/5e/04/e60e01fe168a37c2b7dd2f0dc08f6583c5b96a3d83fc280c5c105928c879/logging_fortified-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27fdb1161fd2aa096f6c6ceac6b3dcf0", "sha256": "cdf055d0dd64a9895bc6540e9f0f0870d19337613d9807624e372d3499c87920" }, "downloads": -1, "filename": "logging-fortified-0.1.4.tar.gz", "has_sig": false, "md5_digest": "27fdb1161fd2aa096f6c6ceac6b3dcf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30270, "upload_time": "2018-05-12T03:39:24", "url": "https://files.pythonhosted.org/packages/0a/86/556f79617f4db5eea2d4e32b2337c97006981b0511123ac2c9bc412cf01e/logging-fortified-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a1541fe1d66d338d1ea300c35b3d6469", "sha256": "55bcf9a9c90137b3d216ce0d797819c1179c7234e84e18c342a09ebf8d8212c7" }, "downloads": -1, "filename": "logging_fortified-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a1541fe1d66d338d1ea300c35b3d6469", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 13023, "upload_time": "2018-05-14T15:10:35", "url": "https://files.pythonhosted.org/packages/6c/37/819b98d1f9a41d0b61fcd41c186603317011f0a6388da8d4a5f63f57ae3d/logging_fortified-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69a23b4db33f24f8815fd96dada83b35", "sha256": "3ef3df8fdaa99d6e7f5b41f079dc39cd34ceb0661a7c47d1869f6958760a5169" }, "downloads": -1, "filename": "logging-fortified-0.1.5.tar.gz", "has_sig": false, "md5_digest": "69a23b4db33f24f8815fd96dada83b35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30297, "upload_time": "2018-05-14T15:10:33", "url": "https://files.pythonhosted.org/packages/86/20/5bb949f01a75e2e353d3012ba99129da07666db275cd1a5d2099addc3df5/logging-fortified-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1541fe1d66d338d1ea300c35b3d6469", "sha256": "55bcf9a9c90137b3d216ce0d797819c1179c7234e84e18c342a09ebf8d8212c7" }, "downloads": -1, "filename": "logging_fortified-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a1541fe1d66d338d1ea300c35b3d6469", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 13023, "upload_time": "2018-05-14T15:10:35", "url": "https://files.pythonhosted.org/packages/6c/37/819b98d1f9a41d0b61fcd41c186603317011f0a6388da8d4a5f63f57ae3d/logging_fortified-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69a23b4db33f24f8815fd96dada83b35", "sha256": "3ef3df8fdaa99d6e7f5b41f079dc39cd34ceb0661a7c47d1869f6958760a5169" }, "downloads": -1, "filename": "logging-fortified-0.1.5.tar.gz", "has_sig": false, "md5_digest": "69a23b4db33f24f8815fd96dada83b35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30297, "upload_time": "2018-05-14T15:10:33", "url": "https://files.pythonhosted.org/packages/86/20/5bb949f01a75e2e353d3012ba99129da07666db275cd1a5d2099addc3df5/logging-fortified-0.1.5.tar.gz" } ] }