{ "info": { "author": "Johan Nestaas", "author_email": "johannestaas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications :: Qt", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "loggylog\n========\n\nComplex logging, simple API\n\nInstallation\n------------\n\nFrom PyPI::\n\n $ pip install loggylog\n\nFrom the project root directory::\n\n $ python setup.py install\n\nUsage\n-----\n\nYou simply instanciate a logger, and give it a log level.\nThe log level can either be a string or a list. If it is a string, it will\nlog that log level or greater, eg. ``'warning'`` specifies warning, critical, or error.\n\nIf you use a list, it will only write those log levels. ``['warning']`` would only write\nwarning level log messages to that file.\n\nSpecifying a string with comma separated values like ``'info,error'`` is equivalent to\nusing ``['info', 'error']``, for convenience if passed as a string through the command line.\n\nIf ``sudo=True``, it will see if it has permission to write to the path, and if not or if\nthe file does not exist and it does not have permission to create a file there, it will\nask for sudo permission and chown the file. This has no effect if you already have permission,\nbut is useful for first time runs of applications that write to ``/var/log/example.log`` but don't \nhave permission to.\n\nIt also uses the string method ``format`` transparently, so this works as expected::\n\n >>> log.critical('Approaching {percent:.2%} the speed of light', percent=0.55554)\n 'Approaching 55.55% the speed of light'\n\nSee the format documentation_ for more examples.\n\n.. _documentation: https://docs.python.org/3.1/library/string.html#format-examples\n\n\nExample API usage::\n\n from loggylog import Logger\n\n log = Logger()\n \n # default is to write all log messages\n log.add_log('./myproject.log')\n\n # write everything but debug level to ./myproject.log\n log.add_log('./myproject.log', level='info')\n\n # write error logging to myproject_error.log\n log.add_log('./myproject_error.log', level='error')\n\n # display to standard out the following log levels\n log.add_log('', level=['warning', 'critical', 'error'])\n\n # 'warning' is the same as ['warning', 'critical', 'error'] or just 'warning'\n # sudo=True will make sure it has permission to write to a file with that\n # path, or get sudo and chown and chmod it appropriately.\n log.add_log('/var/log/myproject.log', level='warning', sudo=True)\n\n # ['error'] will just write only error logging\n log.add_log('just_errors.log', level=['error'])\n\n # if for some reason CSV is more convenient than a list...\n log.add_log('info_and_warning.log', level='info,warning')\n\n # Basic logging\n log.debug('debuggybug')\n log.info('i got something to tell you')\n log.warning('winter is coming')\n log.critical('critical temperature in reactor')\n log.error('sumthin brken')\n\n # Also, it transparently uses string formatting\n log.info(\"We're going to build a {}\", 'wall')\n log.info(\"It's going to be {size}\", size='yuge')\n # Ordering by integers in braces\n log.critical(\"{1} for {0}\", 'me', 'vote')\n # See https://docs.python.org/3.1/library/string.html#format-examples\n # for more examples.\n \nRelease Notes\n-------------\n\n:0.0.1:\n Project created", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.bitbucket.org/johannestaas/loggylog", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "loggylog", "package_url": "https://pypi.org/project/loggylog/", "platform": "", "project_url": "https://pypi.org/project/loggylog/", "project_urls": { "Homepage": "https://www.bitbucket.org/johannestaas/loggylog" }, "release_url": "https://pypi.org/project/loggylog/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Complex logging, simple API", "version": "0.0.3" }, "last_serial": 4088039, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "db89fccdd1532bc9cf5fffdbd10fe0b1", "sha256": "cee02b4fbf0cc645225d785adccf5bb06b755b67f17fef6b2016e8f3a770f4fe" }, "downloads": -1, "filename": "loggylog-0.0.1.tar.gz", "has_sig": false, "md5_digest": "db89fccdd1532bc9cf5fffdbd10fe0b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6432, "upload_time": "2016-06-04T03:51:18", "url": "https://files.pythonhosted.org/packages/d6/4d/91c12dfb71315bce609d6beb13da7bff81230983980d848d6d3c928c179f/loggylog-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e6deb06f2ba6f1b341f22699c8e6e46c", "sha256": "b2db6d2872e074b5f46c16be2d66df010619ab5d2483025c26b4fbe99ab272f2" }, "downloads": -1, "filename": "loggylog-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e6deb06f2ba6f1b341f22699c8e6e46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6446, "upload_time": "2016-07-08T19:05:45", "url": "https://files.pythonhosted.org/packages/46/c3/5d1f5f07ffc13164c7d375742723c7623132de12bd23f2325cb9bfd0af69/loggylog-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "25b8fca619c1c8b0290b82a11c55ff2b", "sha256": "8fa1fb5ffc448708d65d9eaa0d19eaaf2f06a28897a646975163d4719af8e27c" }, "downloads": -1, "filename": "loggylog-0.0.3.tar.gz", "has_sig": false, "md5_digest": "25b8fca619c1c8b0290b82a11c55ff2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6421, "upload_time": "2018-07-21T08:06:38", "url": "https://files.pythonhosted.org/packages/f8/51/4bd8b122341774003e492d0c55a031813658e420c44362b821c664494fdd/loggylog-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25b8fca619c1c8b0290b82a11c55ff2b", "sha256": "8fa1fb5ffc448708d65d9eaa0d19eaaf2f06a28897a646975163d4719af8e27c" }, "downloads": -1, "filename": "loggylog-0.0.3.tar.gz", "has_sig": false, "md5_digest": "25b8fca619c1c8b0290b82a11c55ff2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6421, "upload_time": "2018-07-21T08:06:38", "url": "https://files.pythonhosted.org/packages/f8/51/4bd8b122341774003e492d0c55a031813658e420c44362b821c664494fdd/loggylog-0.0.3.tar.gz" } ] }