{ "info": { "author": "salpreh", "author_email": "salva.perez46@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# clinlog\n\n[![PyPI version](https://badge.fury.io/py/clinlog.svg)](https://badge.fury.io/py/clinlog)\n[![PyPI version](https://img.shields.io/github/license/salpreh/clinlog.svg)](https://img.shields.io/github/license/salpreh/clinlog.svg)\n\n**Package to easily log styled messages on console using [colorama](https://github.com/tartley/colorama)**\n\n---\n## Basic usage\nCreate a `Logger` object and use his convenient methods to print styled messages in console. You can define a default tag for each kind of message on the `Logger` instance.\n\n### Print style methods\n- `confirm()`\n- `error()`\n- `warning()`\n- `info()`\n- `debug()`\n- `print()`\n\nThe signature for all print methods are the same:\n1. **message _(str)_**: Message to print.\n2. **tag _(str)_**: (Optional) Prefix tag to print with the message. If `None` the default tag for this kind of messages is used. An empty string will remove the tag for this print.\n3. **bold _(bool)_**: (Optional) `True` to use bright style to print the message (kind of bold font). By default `False`.\n4. **highlight _(bool)_**: `True` to use the color on the background and a high contrast color for the message text.\n5. **invert_color _(bool)_**: `True` to invert font color when highlight flag is on, this will switch between black and white. By default `False`.\n\n### Default print tag attributes\nWhen a `Logger` object is created all default tags are an empty string _(no tag)_\n- `confirm_tag`\n- `error_tag`\n- `warn_tag`\n- `info_tag`\n- `print_tag`\n\n### Log level param\nYou can provide a log level parameter to control the verbosity of the logger, this parameter can be provided during construction or via setter method. By default `Logger` class takes max verbosity level _(debug)_\n```py\nfrom clinlog import Logger\n\n# Creating a Logger with warining log level\nlog = Logger(log_level='warning')\n\n# Updating log level via setter\nlog.log_level = 'debug'\n\n```\n\n\n### Code Sample\n```py\nfrom clinlog import Logger\n\n# Create the logger\nlog = Logger()\n\n# Set default error tag\nlog.error_tag = '[ERROR]: '\n\n# Print error styled message\nlog.error('Unable to access config file', bold=True)\n\n# Print warning highlighted and bold\nlog.warning('The execution will continue with default configuration', None, True, True)\n\n# Confirmation log with provided tag\nlog.confirm('Execution completed', '[SUCCESS]')\n\n# Debug log with provided tag\nlog.debug('DB returned 8 entries for the user', '[DEBUG] ')\n```\n\n### Output\n\"tree_output\"\n\n### Different styes sample\n\"tree_output\"\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://github.com/salpreh/clinlog", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "clinlog", "package_url": "https://pypi.org/project/clinlog/", "platform": "", "project_url": "https://pypi.org/project/clinlog/", "project_urls": { "Homepage": "https://github.com/salpreh/clinlog" }, "release_url": "https://pypi.org/project/clinlog/0.1.1/", "requires_dist": [ "colorama (>=0.3.8)" ], "requires_python": "", "summary": "Package to log styled messages on console", "version": "0.1.1" }, "last_serial": 5725701, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "58861b47aa64097a0d67f5a9e3faa78e", "sha256": "29b5eccff05b066ca423b61d668c884d00487f5695131f34cad5740e1cc2b806" }, "downloads": -1, "filename": "clinlog-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "58861b47aa64097a0d67f5a9e3faa78e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4146, "upload_time": "2019-04-25T18:00:49", "url": "https://files.pythonhosted.org/packages/f8/1f/f08c4d2d7ab09bd93186eb219a85f93644f45597ca185e2c991f6634c855/clinlog-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3280ef3cd40077a1c6ef8f6710ab5ff", "sha256": "701fcd3ebf21caf69aa1bc11832886524b7d002b27b97517bf56fb6455f109a3" }, "downloads": -1, "filename": "clinlog-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e3280ef3cd40077a1c6ef8f6710ab5ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3033, "upload_time": "2019-04-25T18:00:57", "url": "https://files.pythonhosted.org/packages/07/75/12c58c14e745c529e935d51649ece329852354d4fac24f0ed8e7dc391f30/clinlog-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cf5f179cceb58c4cca209d4c67584151", "sha256": "dab09519210cd7ae864bccebcc9bd5aea200d1d16fef090c6677ecaa4f49ea9f" }, "downloads": -1, "filename": "clinlog-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cf5f179cceb58c4cca209d4c67584151", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4787, "upload_time": "2019-08-25T00:58:40", "url": "https://files.pythonhosted.org/packages/9d/55/7409774b276720cf5a5403beb5782d8d575acceecf87bfba02c0e8ad8801/clinlog-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29fc059fa3c5ab382f00398931c32e0b", "sha256": "25733bfcc28b66291c3d99c72a8737172324b251eae42967a71e9201c2721182" }, "downloads": -1, "filename": "clinlog-0.1.1.tar.gz", "has_sig": false, "md5_digest": "29fc059fa3c5ab382f00398931c32e0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3747, "upload_time": "2019-08-25T00:58:42", "url": "https://files.pythonhosted.org/packages/2e/48/f5293cd6daf1884561d832c1d45081be58138a0b91916f7ea93ab6510500/clinlog-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cf5f179cceb58c4cca209d4c67584151", "sha256": "dab09519210cd7ae864bccebcc9bd5aea200d1d16fef090c6677ecaa4f49ea9f" }, "downloads": -1, "filename": "clinlog-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cf5f179cceb58c4cca209d4c67584151", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4787, "upload_time": "2019-08-25T00:58:40", "url": "https://files.pythonhosted.org/packages/9d/55/7409774b276720cf5a5403beb5782d8d575acceecf87bfba02c0e8ad8801/clinlog-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29fc059fa3c5ab382f00398931c32e0b", "sha256": "25733bfcc28b66291c3d99c72a8737172324b251eae42967a71e9201c2721182" }, "downloads": -1, "filename": "clinlog-0.1.1.tar.gz", "has_sig": false, "md5_digest": "29fc059fa3c5ab382f00398931c32e0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3747, "upload_time": "2019-08-25T00:58:42", "url": "https://files.pythonhosted.org/packages/2e/48/f5293cd6daf1884561d832c1d45081be58138a0b91916f7ea93ab6510500/clinlog-0.1.1.tar.gz" } ] }