{ "info": { "author": "photofroggy", "author_email": "froggywillneverdie@msn.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "**Stutter** is my own idea for a simple logging lib. Objects in the package handle\ntimestamps and logging to files automatically. Logging to files can be buffered,\nand even threaded, according to your application's needs.\n\nNote that it may be possible to use the BufferedReader object with twisted to\neliminate the need for threading. I may create such an object in future.\n\n-------------\nBrief example\n-------------\n\nUse objects from this package if you want to log messages. I intend to use this\nin a bot, and possibly a client, for the deviantART chat network. Logging can\nbe done as follows::\n \n from stutter import logging\n \n logger = logging.BaseLogger()\n logger.message('Sup homie?')\n logger.message('Everything is saved to files in `./log` by default')\n logger.message('You can change this somehow... I'll explain later.')\n logger.debug('This message won't be printed on-screen, but will be saved.')\n\n \n----------------\nBuffered logging\n----------------\n\nFile IO can be expensive sometimes, so you can use the BufferedLogger object\nto determine when messages should be saved to files. When a BufferedLogger is\nused to display log messages on screen, the messages are displayed instantly,\nbut they not saved to any files until `.push()` is used::\n \n import time\n from stutter import logging\n \n logger = logging.BufferedLogger()\n logger.message('Some boring message...')\n time.sleep(5)\n # You can use the time you have to confirm that no logs have been written\n # yet, if you like. These are really trivial examples...\n logger.warning('Writing logs!')\n logger.push()\n\nNote that `.push()` will only save up to 5 messages at a time. You can change\nthis by telling `push` how many messages to save using the `limit` parameter.\nFor example, to save up to 10 messages, you would call `.push(limit=10)`. To\npush **all** stored messages to log files, call `.push(limit=0)`.\n\n----------------\nThreaded logging\n----------------\n\nIf you want to automate calls to `push` without having to really think about it\ntoo much, you can use the `ThreadedLogger` object. A brief and naive example::\n \n from stutter import logging\n \n logger = logging.ThreadedLogger()\n # Start pushing in a thread.\n logger.start()\n logger.message('Your mother smells of elderberries.')\n # Stop the threading stuff.\n logger.stop()\n # Wait until the thread has actually stopped.\n logger.join()\n # Make sure all log messages have been saved.\n # This is not done by stopping the thread!\n logger.push(0)\n\n=============\nDocumentation\n=============\n\nI will write documentation when I can be arsed.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://photofroggy.github.com/stutter/index.html", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "stutter", "package_url": "https://pypi.org/project/stutter/", "platform": "Any", "project_url": "https://pypi.org/project/stutter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://photofroggy.github.com/stutter/index.html" }, "release_url": "https://pypi.org/project/stutter/1.1/", "requires_dist": null, "requires_python": null, "summary": "Logging objects for Python apps.", "version": "1.1" }, "last_serial": 800193, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "87850cb4380fe6396bec7d1111d97e46", "sha256": "87105fbbe89df1f692ca3ac6a3b293eb7c9561bf0f29056a91a154cde7601d5c" }, "downloads": -1, "filename": "stutter-1.1.tar.gz", "has_sig": false, "md5_digest": "87850cb4380fe6396bec7d1111d97e46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6398, "upload_time": "2011-11-07T03:43:21", "url": "https://files.pythonhosted.org/packages/9d/85/96de24015f13cb71350b5ba08b06cd37d299408cf2e353c676d6c081dbf7/stutter-1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "52ede8460ec05d387e63b278e6e20a03", "sha256": "ab53c51b108da054bae61090a3009f068544e64de02224a71ee834b8366908fe" }, "downloads": -1, "filename": "stutter-1.1.zip", "has_sig": false, "md5_digest": "52ede8460ec05d387e63b278e6e20a03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10879, "upload_time": "2011-11-07T03:43:22", "url": "https://files.pythonhosted.org/packages/4e/84/026586e02add20607080830f3d64f99c773731f559bdf4bcd79a0801a467/stutter-1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87850cb4380fe6396bec7d1111d97e46", "sha256": "87105fbbe89df1f692ca3ac6a3b293eb7c9561bf0f29056a91a154cde7601d5c" }, "downloads": -1, "filename": "stutter-1.1.tar.gz", "has_sig": false, "md5_digest": "87850cb4380fe6396bec7d1111d97e46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6398, "upload_time": "2011-11-07T03:43:21", "url": "https://files.pythonhosted.org/packages/9d/85/96de24015f13cb71350b5ba08b06cd37d299408cf2e353c676d6c081dbf7/stutter-1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "52ede8460ec05d387e63b278e6e20a03", "sha256": "ab53c51b108da054bae61090a3009f068544e64de02224a71ee834b8366908fe" }, "downloads": -1, "filename": "stutter-1.1.zip", "has_sig": false, "md5_digest": "52ede8460ec05d387e63b278e6e20a03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10879, "upload_time": "2011-11-07T03:43:22", "url": "https://files.pythonhosted.org/packages/4e/84/026586e02add20607080830f3d64f99c773731f559bdf4bcd79a0801a467/stutter-1.1.zip" } ] }