{ "info": { "author": "Andreas Kaiser", "author_email": "disko@binary-punks.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "Introduction\n============\n\nDo you find yourself repeating the same statements over and over again to get your logging configured? I did.\n\nbp.logging eases logging setup in that these kind of statements are reduced to a bare minimum. It does so by providing a getLogger function which returns the same as Python's standard library function with the same name: an instance of the Logger class (a.k.a. a logger object). The difference to the Python Library's getLogger are the arguments that can be passed and the default configuration of the returned logger object.\n\nbp.logging might not be useful for anyone besides myself, as default logging is configured for my very own habits and you won't gain much from using it instead of Python's standard logging facilities if your's are quite different. Maybe one day bp.logging will be extended and much more generic and/or configurable, but that day might be long after the universe has collapsed.\n\n\nUsage\n=====\n\n``from bp.logging import *``\n\n``logger = getLogger(name, console_threshold=None, logfile_threshold=None, logfile_path=None, console_format=\"%(levelname)s: %(name)s - %(message)s\", logfile_format=\"%(asctime)s - %(levelname)s: %(name)s - %(message)s\")``\n\n``logger.critical(\"critical message\")``\n\n``logger.error(\"error message\")``\n\n``logger.warning(\"warning message\")``\n\n``logger.info(\"info message\")``\n\n``logger.debug(\"debug message\")``\n\n\nExamples\n********\n\ndebugging to console\n--------------------\n\n``logger = getLogger(\"my logger\", console_threshold=debug)``\n\nor\n\n``logger = getLogger(\"my logger\", debug)``\n\n\nwarnings to file\n----------------\n\n``logger = getLogger(\"my logger\", logfile_path=\"/var/log/my.log\", logfile_threshold=warning)``\n\ninfos to console, errors to file\n--------------------------------\n\n``logger = getLogger(\"my logger\", console_threshold=info, logfile_path=\"/var/log/my.log\", logfile_threshold=error)``\n\nor\n\n``logger = getLogger(\"my logger\", info, error, \"/var/log/my.log\")``\n\n\n\nChangelog\n=========\n\n0.2\n***\n\n- Fixed bug when console and logfile thresholds are different.\n Now the logger's level is set to the lowest level of it's handlers.\n\n0.1\n***\n\n- Initial release\n\n\n\nLICENSE\n=======\n\nCopyright (c) 2011, disko@binary-punks.com\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n- Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n \n- Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n \n- Neither the name of the binary punks nor the names of its contributors may\n be used to endorse or promote products derived from this software without\n specific prior written permission.\n\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "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/disko/bp.logging", "keywords": "logging", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "bp.logging", "package_url": "https://pypi.org/project/bp.logging/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bp.logging/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/disko/bp.logging" }, "release_url": "https://pypi.org/project/bp.logging/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Reduce logging related repetition in your code", "version": "0.2.1" }, "last_serial": 787024, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bc18223869d346fc45a2f093858508f9", "sha256": "64dea25d8ef91d5debdc5c84e3b63ec4a5eb6b66186a0cd7d39bdfdcd2c61c06" }, "downloads": -1, "filename": "bp.logging-0.1.zip", "has_sig": false, "md5_digest": "bc18223869d346fc45a2f093858508f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9415, "upload_time": "2011-02-05T14:17:26", "url": "https://files.pythonhosted.org/packages/f4/93/a01a162c5c5227bd017853aee5aef3fbe0e50b6c1981a6e6f2a1841fa595/bp.logging-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "85b6474a718fd318ceaf72ecbdbfa933", "sha256": "ac2d2b24b2c41fac7d87fce303e0d51230dcd1c01de58769f1fa333f62449399" }, "downloads": -1, "filename": "bp.logging-0.2.zip", "has_sig": false, "md5_digest": "85b6474a718fd318ceaf72ecbdbfa933", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14927, "upload_time": "2011-02-05T15:09:39", "url": "https://files.pythonhosted.org/packages/d9/63/6a2f4841d8b3a5f3d66693817509902d46a85b4524ef1d8aae6523fc88e7/bp.logging-0.2.zip" } ], "0.2-dev": [ { "comment_text": "", "digests": { "md5": "b2201275a4300b322d8b08fe226cde0d", "sha256": "25c1adc1edb03fa25365ec48910fa952d028ca9cbd888e58216b9ee192c4421f" }, "downloads": -1, "filename": "bp.logging-0.2-dev.zip", "has_sig": false, "md5_digest": "b2201275a4300b322d8b08fe226cde0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14787, "upload_time": "2011-02-05T14:32:46", "url": "https://files.pythonhosted.org/packages/64/12/ac7e2bc8c0bc3c3b786e5f5838260b16f89ee953ba7f7ee618f486c1b039/bp.logging-0.2-dev.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4f6991e8607bad261fd6f5f7eeaca8b3", "sha256": "ecb95a265d865f7bcbfab8a19c11ea8f002bb4c4677ea4245cbdc77449a89ec4" }, "downloads": -1, "filename": "bp.logging-0.2.1.zip", "has_sig": false, "md5_digest": "4f6991e8607bad261fd6f5f7eeaca8b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15004, "upload_time": "2011-02-05T15:13:01", "url": "https://files.pythonhosted.org/packages/76/24/30cc27cfdefe3a4c920ca4090da1e1247c19051198103d191cee5e49ff63/bp.logging-0.2.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4f6991e8607bad261fd6f5f7eeaca8b3", "sha256": "ecb95a265d865f7bcbfab8a19c11ea8f002bb4c4677ea4245cbdc77449a89ec4" }, "downloads": -1, "filename": "bp.logging-0.2.1.zip", "has_sig": false, "md5_digest": "4f6991e8607bad261fd6f5f7eeaca8b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15004, "upload_time": "2011-02-05T15:13:01", "url": "https://files.pythonhosted.org/packages/76/24/30cc27cfdefe3a4c920ca4090da1e1247c19051198103d191cee5e49ff63/bp.logging-0.2.1.zip" } ] }