{ "info": { "author": "", "author_email": "kturunen@nokia.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Mdclogpy\n========\n\nStructured logging library with Mapped Diagnostic Context\n\n* Outputs the log entries to standard out in structured format, json currently.\n* Severity based filtering.\n* Supports Mapped Diagnostic Context (MDC).\n Set MDC pairs are automatically added to log entries by the library.\n\n\nLog entry format\n----------------\n\nEach log entry written with mdclog_write() function contains\n\n* Timestamp\n* Logger identity\n* Log entry severity\n* All existing MDC pairs\n* Log message text\n\nCurrently the library only supports JSON formatted output written to standard\nout of the process.\n\n*Example log output*\n\n`{\"ts\": 1559285893047, \"crit\": \"INFO\", \"id\": \"myprog\", \"mdc\": {\"second key\":\"other value\",\"mykey\":\"keyval\"}, \"msg\": \"Hello world!\"}`\n\nInstall\n-------\n\nInstall from PyPi\n\n```\npython3 -m pip install mdclogpy\n```\n\nInstall using the source\n\n```\npython3 setup.py install\n```\n\nUsage\n-----\n\nThe library can be used in two ways shown below.\n\n1) Use the root logger\n\n```python\n import mdclogpy\n mdclogpy.error(\"This is an error log\")\n```\n\n2) Create a logger instance\n\n```python\n from mdclogpy import Logger\n my_logger = Logger()\n my_logger.error(\"This is an error log\")\n```\n\nA program can create several logger instances.\n\n\nMapped Diagnostics Context\n--------------------------\n\nThe MDCs are logger instance specific key-value pairs, which are included to\nall log entries written via the logger instance.\n\nBy default, the library implements a root logger instance.\nMDCs added to the root logger instance are added only to the log entries\nwritten via the root logger instance.\n\n\nLicense\n-------\n\nCopyright (c) 2019 AT&T Intellectual Property.\nCopyright (c) 2018-2019 Nokia.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\nUnit testing\n------------\n\nTo run the unit tests run the following command in the package directory::\n`\npython3 -m unittest discover\n`\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gerrit.o-ran-sc.org/r/admin/repos/com/pylog", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "mdclogpy", "package_url": "https://pypi.org/project/mdclogpy/", "platform": "", "project_url": "https://pypi.org/project/mdclogpy/", "project_urls": { "Homepage": "https://gerrit.o-ran-sc.org/r/admin/repos/com/pylog" }, "release_url": "https://pypi.org/project/mdclogpy/1.1/", "requires_dist": null, "requires_python": "", "summary": "Structured logging library with Mapped Diagnostic Context", "version": "1.1" }, "last_serial": 5633013, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "daf45f908cc2ce0fc9e8f0a1805f66ee", "sha256": "145dd6c144edf2bbef3278fb8d6134970c275b6a9ef8580a4a02405c05282162" }, "downloads": -1, "filename": "mdclogpy-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "daf45f908cc2ce0fc9e8f0a1805f66ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5805, "upload_time": "2019-07-04T13:11:47", "url": "https://files.pythonhosted.org/packages/48/e4/380f27f00446066e15a4e42212c1bf93af232b988c6b6d1452a359264c07/mdclogpy-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "158a056d8c32bcdac4c5398f212d3b0f", "sha256": "b7acbe62579015d8a7c9bd4d3644c20974460e4963d8dbe376cd76998f905662" }, "downloads": -1, "filename": "mdclogpy-1.0.tar.gz", "has_sig": false, "md5_digest": "158a056d8c32bcdac4c5398f212d3b0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3855, "upload_time": "2019-07-04T13:11:50", "url": "https://files.pythonhosted.org/packages/00/51/0e0e92f25d8d4200822e7d536d7d3bd0fd5b237bf2a96aa437bad2f18d08/mdclogpy-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "f130e347be46ed4b024f4f4d2a278fe5", "sha256": "c95d2d5eba158f87a213d1759368fe5cd52040f6938735a4aec4162be6035889" }, "downloads": -1, "filename": "mdclogpy-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f130e347be46ed4b024f4f4d2a278fe5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5809, "upload_time": "2019-08-05T07:53:33", "url": "https://files.pythonhosted.org/packages/18/d9/9e47e260c9a57e35b76cba8c5e9b4c3cc6f58501a2078a162d064187dc7e/mdclogpy-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8982b47e7187eb70d1f90b858bdc500d", "sha256": "4efbd69b0201366edfd62576073602494793f4888faa0fe36e0ca5fead01cd0f" }, "downloads": -1, "filename": "mdclogpy-1.1.tar.gz", "has_sig": false, "md5_digest": "8982b47e7187eb70d1f90b858bdc500d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3859, "upload_time": "2019-08-05T07:53:34", "url": "https://files.pythonhosted.org/packages/02/28/c5a6b9ebd8af69db894e27fc32494f1a297515e0749b00781a823df53f09/mdclogpy-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f130e347be46ed4b024f4f4d2a278fe5", "sha256": "c95d2d5eba158f87a213d1759368fe5cd52040f6938735a4aec4162be6035889" }, "downloads": -1, "filename": "mdclogpy-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f130e347be46ed4b024f4f4d2a278fe5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5809, "upload_time": "2019-08-05T07:53:33", "url": "https://files.pythonhosted.org/packages/18/d9/9e47e260c9a57e35b76cba8c5e9b4c3cc6f58501a2078a162d064187dc7e/mdclogpy-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8982b47e7187eb70d1f90b858bdc500d", "sha256": "4efbd69b0201366edfd62576073602494793f4888faa0fe36e0ca5fead01cd0f" }, "downloads": -1, "filename": "mdclogpy-1.1.tar.gz", "has_sig": false, "md5_digest": "8982b47e7187eb70d1f90b858bdc500d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3859, "upload_time": "2019-08-05T07:53:34", "url": "https://files.pythonhosted.org/packages/02/28/c5a6b9ebd8af69db894e27fc32494f1a297515e0749b00781a823df53f09/mdclogpy-1.1.tar.gz" } ] }