{ "info": { "author": "Robot Framework Developers", "author_email": "robotframework@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Robot Framework", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing" ], "description": ".. default-role:: code\n\nBackground logging support to test libraries\n============================================\n\nThis helper module is indented to be used by Robot Framework test libraries\nthat run keywords in background using threads and that want those threads\nto be able to log. By default, as `explained in Robot Framework User Guide`__,\nmessages logged by threads using the programmatic APIs are ignored, and results\nof logging using the standard output are undefined.\n\nThis module provides a custom logger that works mostly like the standard\n`robot.api.logger`__, but also stores messages logged by background threads.\nIt also provides a method the main thread can use to forward the logged\nmessages to Robot Framework's log.\n\nRobot Background Logger is hosted in `Github`__ and downloads can be found\nfrom `PYPI`__. Installation is easiest done with pip::\n\n pip install robotbackgroundlogger\n\nStarting from version 1.2 this module support both Python 2 and Python 3.\n\n__ http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#communication-when-using-threads\n__ https://robot-framework.readthedocs.org/en/latest/autodoc/robot.api.html#module-robot.api.logger\n__ https://github.com/robotframework/robotbackgroundlogger\n__ https://pypi.python.org/pypi/robotbackgroundlogger\n\nUsage\n-----\n\nThe logger can be taken into use like this:\n\n.. sourcecode:: python\n\n from robotbackgroundlogger import BackgroundLogger\n logger = BackgroundLogger()\n\nAfter that `logger` can be used mostly like `robot.api.logger`:\n\n.. sourcecode:: python\n\n logger.debug('Hello, world!')\n logger.info('HTML example', html=True)\n\nWhen used by the main thread, messages will be logged immediately exactly like\nwith `robot.api.logger`. When used by other threads, messages will be stored\ninternally. They can be later logged by the main thread by running:\n\n.. sourcecode:: python\n\n logger.log_background_messages()\n\nIf you want to log only messages logged by a certain thread, you can use\npass the name of the thread as an argument:\n\n.. sourcecode:: python\n\n logger.log_background_messages('Example thread')\n\nLogged messages are also removed from the internal message storage. It is\npossible to do that also without logging:\n\n.. sourcecode:: python\n\n # Remove all messages\n logger.reset_background_messages()\n # Remove messages logged by the named thread\n logger.reset_background_messages('Another thread')\n\nExample\n-------\n\n`example.py`__ library that is used by `example.robot`__ shows how this\nmodule can be used in practice. You can run the example like::\n\n pybot example.robot\n\n__ https://github.com/robotframework/robotbackgroundlogger/blob/master/example.py\n__ https://github.com/robotframework/robotbackgroundlogger/blob/master/example.robot", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/robotbackgroundlogger", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robotframework/robotbackgroundlogger", "keywords": "robotframework testing testautomation atdd", "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "robotbackgroundlogger", "package_url": "https://pypi.org/project/robotbackgroundlogger/", "platform": "any", "project_url": "https://pypi.org/project/robotbackgroundlogger/", "project_urls": { "Download": "https://pypi.python.org/pypi/robotbackgroundlogger", "Homepage": "https://github.com/robotframework/robotbackgroundlogger" }, "release_url": "https://pypi.org/project/robotbackgroundlogger/1.2/", "requires_dist": null, "requires_python": null, "summary": "A helper module for logging to Robot Framework log from background threads.", "version": "1.2" }, "last_serial": 2584644, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "a0191c4e5d3d2ef1872f4d4be6487b5e", "sha256": "27e71325284db526cbe1a9f3f237d704432ef81318e362decb373659ec2c25ca" }, "downloads": -1, "filename": "robotbackgroundlogger-1.0.tar.gz", "has_sig": false, "md5_digest": "a0191c4e5d3d2ef1872f4d4be6487b5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3512, "upload_time": "2014-12-16T12:38:16", "url": "https://files.pythonhosted.org/packages/a9/69/fb345fe42a0a2ec9d2dcdc2d2d57a5d9de7ea2434084ec31e93537f47659/robotbackgroundlogger-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "0be24d3358fbe6ac5c952c1fd28cbd9a", "sha256": "4c436ea321729f903eed3155f26bac18812474be71ecf302b02844aa20b697bd" }, "downloads": -1, "filename": "robotbackgroundlogger-1.1.tar.gz", "has_sig": false, "md5_digest": "0be24d3358fbe6ac5c952c1fd28cbd9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3852, "upload_time": "2014-12-16T13:05:16", "url": "https://files.pythonhosted.org/packages/8e/5a/e2f4dea21bc0028c3d9af5e69163f8d6a3fe8b649de4e7f5406bf1c9009c/robotbackgroundlogger-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "f23f0218cb7eb6ee6b0311dac43a6909", "sha256": "581be5c9d52d502c10c1548304afad849daf99eb057f26148d4de59b86941e12" }, "downloads": -1, "filename": "robotbackgroundlogger-1.2.tar.gz", "has_sig": false, "md5_digest": "f23f0218cb7eb6ee6b0311dac43a6909", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3910, "upload_time": "2017-01-19T11:11:46", "url": "https://files.pythonhosted.org/packages/ff/d5/3f44fccb418e5e111fd819f5f3cd62f9950f406b50557129f76e064efd7b/robotbackgroundlogger-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f23f0218cb7eb6ee6b0311dac43a6909", "sha256": "581be5c9d52d502c10c1548304afad849daf99eb057f26148d4de59b86941e12" }, "downloads": -1, "filename": "robotbackgroundlogger-1.2.tar.gz", "has_sig": false, "md5_digest": "f23f0218cb7eb6ee6b0311dac43a6909", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3910, "upload_time": "2017-01-19T11:11:46", "url": "https://files.pythonhosted.org/packages/ff/d5/3f44fccb418e5e111fd819f5f3cd62f9950f406b50557129f76e064efd7b/robotbackgroundlogger-1.2.tar.gz" } ] }