{
"info": {
"author": "Doug Rudolph",
"author_email": "drudolph914@gmail.com",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7"
],
"description": "# plogs \u2014 Pretty Logs\n\n### Project Goals\nIn the beginning, the goal of Pretty Logs was to create a colorful logging system designed for scalable projects. Later,\nmy vision for Pretty Logs widened in scope to also include useful debugging tools that are found in JavaScript and\naren't that readily available in Python.\n\nIn the future, we anticipate better control to configure logging settings and a debugging log level where debug tools\ncan only print to.\n\n\n### Install\nYou can install Pretty Logs via pip. [pypi link](https://pypi.org/project/plogs/)\n\n```\n$ pip install --upgrade plogs\n```\n\n\n### Setup\n\nImporting Pretty Logs into your project is quite simple. All that's required is to import plogs and instantiate an instance of Logger.\n\n```python3\nfrom plogs import get_logger\nlogging = get_logger()\n```\n\nIt's recommend to do the following steps inside a `__init__.py` file at the root level of your project so Pretty Logs can be referenced throughout the entire application.\n\n\n### Log with Colors\n\nPretty Logs' main feature is color coding different logging levels and statuses. The default logging levels are set mapped to:\n\n| Log Level | Color |\n| --- | --- |\n| logging.info| gray |\n| logging.status | bold |\n| logging.success | green |\n| logging.warning | orange |\n| logging.error | red |\n| logging.critical | red highlights |\n\n\n### Log to a File\nPretty Logs can write colored logs to files. This is done through Pretty Logs' config function.\n\n```python3\nfrom plogs import get_logger\n\nlogging = get_logger()\nlogging.config(to_file=True)\n\nlogging.info('this is will be written to a file')\n```\n\nBy default, files are written to `/var/log/plogs/plog_01.log`. `/var/log/` is chosen as the default directory because it is commonly used on unix based machines and in\ndocker images services.\n\nIf you are looking to use another filename and location, it can simply be edited like such:\n\n```python3\nlogging.config(to_file=True, file_location='your/filepath/here/', filename='new_file.log')\n```\n\nNote: It's recommended to view colored logs with the `less` terminal command - if `less` doesn't work be default, `less -r` is worth trying. Also, Pretty Logs\nwas not designed to show colored files in Vim, Atom, Sublime, and other popular text editors.\n\n\n\n### Formating Logs\n\nPretty Logs allows for a lot of customization. Customizing logs is done by editing the logging config and supplying Pretty Logs with a formatted string.\n\nThe following are all the configurable variables:\n\n\n| Variable | Type | Format Keyword | Description |\n| --- | --- | --- | --- |\n| `pretty` | `bool` | `N/A` | Setting to `True` will add color to logs, `False` will un-color logs |\n| `show_levels` | `bool` | `{level}` | Setting to `True` will show logging level in formatted log, `False` show no logging level |\n| `show_time` | `bool` | `{time}` | Setting to `True` will show time in formatted log, `False` doesn't show time |\n| `to_file` | `bool` | `N/A` | Setting to `True` writes logs to `file_location`, `False` writes to `standard output` |\n| `file_location` | `str` | `{file_location}` | Default `file_location` is `/var/log/plogs/`, otherwise a file location of your choice |\n| `filename` | `str` | `{filename}` | Default log file is `plog_01.log`, otherwise a filename of your choice |\n| `N\\A` | `N/A` | `{msg}` | Shows the log message in formatted log |\n\n\nAn example of a formatted logs would be like such:\n\n```python3\nfrom plogs import get_logger\n\nlogging = get_logger()\n\n# configure plogs to allow logging level and date/time\nlogging.config(show_levels=True, show_time=True)\n\n# config logs with the `{level}` keyword to show the logging level,\n# `{time}` to show the date & time of when the log was written\n# and `{msg} to show the logging message\nlogging.format('[{level}] - {time} - {msg}')\n\n# finally write logs\nlogging.status('Show me the logs')\nlogging.info('We got some info')\n\n# Output:\n# [STATUS] - 2018-12-11 11:56:05 - Show me the logs\n# [INFO] - 2018-12-11 11:56:09 - We got some info\n```\n\nNOTE: In order to format Pretty Logs you must put the variable you want written inside `{}` - ie like so: `{filename}`, `{file_location}`, `{levels}`, etc.\nThese values will be substituted for the variable they represent\n\n### How can I Contribute?\nIf you are looking to contribute, you can check out you the [how to contribute doc](https://github.com/11/plogs/blob/master/docs/contribute.md)",
"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/11/plogs",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "plogs",
"package_url": "https://pypi.org/project/plogs/",
"platform": "",
"project_url": "https://pypi.org/project/plogs/",
"project_urls": {
"Homepage": "https://github.com/11/plogs"
},
"release_url": "https://pypi.org/project/plogs/0.1.5/",
"requires_dist": null,
"requires_python": "",
"summary": "Bring color and formatting to your logs",
"version": "0.1.5"
},
"last_serial": 4896239,
"releases": {
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "2b42c22a9b3f9f49a5447ebecac3f866",
"sha256": "9f101f0d6d03d59ca72a462030c0beac4b3c51834cbdb736efb9d1577ba2154e"
},
"downloads": -1,
"filename": "plogs-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b42c22a9b3f9f49a5447ebecac3f866",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7406,
"upload_time": "2019-02-09T20:07:53",
"url": "https://files.pythonhosted.org/packages/22/f8/5d2954f6486805c62c69773f956366ed7b4643dff22ca397fc2fdccb54f7/plogs-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "1f80593360131e0609a8a99f7b2f2a32",
"sha256": "5e55dc96ce60c8ca879afc96257aeaa005959173749c1ce82e3dd8966b7b4fee"
},
"downloads": -1,
"filename": "plogs-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "1f80593360131e0609a8a99f7b2f2a32",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6081,
"upload_time": "2019-02-09T20:07:55",
"url": "https://files.pythonhosted.org/packages/5a/9b/1530cdd7840ff860b0d87eacd2df41dfb10e5349f9bca6b722e9cf169456/plogs-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "779bdd47f9a9b3960d2ce03d519e390b",
"sha256": "b5851d18e21338bbfd30ee12d813a119dc36cdbfd1c2b23f71747e5dabc681ea"
},
"downloads": -1,
"filename": "plogs-0.1.2-py3.7.egg",
"has_sig": false,
"md5_digest": "779bdd47f9a9b3960d2ce03d519e390b",
"packagetype": "bdist_egg",
"python_version": "3.7",
"requires_python": null,
"size": 23259,
"upload_time": "2019-02-09T21:12:24",
"url": "https://files.pythonhosted.org/packages/16/74/4d39521ef8c92aa447d674e65613e58855b8b441b7e6c63b02f84e7483d8/plogs-0.1.2-py3.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "91281f8117efd2ecb1922ae64a6a1527",
"sha256": "81f712bc6685f3f98fa5897e872ed4b949bb63e1c36f62819a7c9768077f4688"
},
"downloads": -1,
"filename": "plogs-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "91281f8117efd2ecb1922ae64a6a1527",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12508,
"upload_time": "2019-02-09T21:12:23",
"url": "https://files.pythonhosted.org/packages/9b/d5/dab72fa6f40b1fdb835c761ea41a41de66a73df6d86350efa54b9f33fbec/plogs-0.1.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "7d5d3c9e8e6a796cb7d269cc82381ea4",
"sha256": "03a7ef737b45abd2598a70de56ea2f7a3369684aa1abbc4a766b7b0bb86ece21"
},
"downloads": -1,
"filename": "plogs-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "7d5d3c9e8e6a796cb7d269cc82381ea4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6141,
"upload_time": "2019-02-09T21:12:26",
"url": "https://files.pythonhosted.org/packages/4b/24/4480ed9d9eef39057595382b092f4c8cf18e73e4effe8b7a9625ee99d35d/plogs-0.1.2.tar.gz"
}
],
"0.1.3": [
{
"comment_text": "",
"digests": {
"md5": "c10c000387264f0dadf39245ba6c14f2",
"sha256": "bddcd3d0468c0784ebb5d77231b188dc7b85712d7fdb73c9d2a3e6a36fa84535"
},
"downloads": -1,
"filename": "plogs-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c10c000387264f0dadf39245ba6c14f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7147,
"upload_time": "2019-02-13T05:09:47",
"url": "https://files.pythonhosted.org/packages/a2/27/d21a87bb7d20ce50d6ae19caf518e2a66c211e88cc0adf6628fb260e51bd/plogs-0.1.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "f6fc26779f2ae79f9675b56808848dbf",
"sha256": "d75efd26c05be28e9feffda77312d949fb2c42c0772e126e4788085fcc05d43e"
},
"downloads": -1,
"filename": "plogs-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "f6fc26779f2ae79f9675b56808848dbf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5681,
"upload_time": "2019-02-13T05:09:49",
"url": "https://files.pythonhosted.org/packages/ed/42/3f92e6df7812d9c6dac98fb084fb2941dd7e85dc0987a852d2d3d1e03826/plogs-0.1.3.tar.gz"
}
],
"0.1.4": [
{
"comment_text": "",
"digests": {
"md5": "745f5bb3d21b116e0d5b71f5f268946a",
"sha256": "f75bdf02766dc303c9f9bb9bd6b5a996f12a00b8b92e8b379ba64cada55f9656"
},
"downloads": -1,
"filename": "plogs-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "745f5bb3d21b116e0d5b71f5f268946a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6642,
"upload_time": "2019-02-24T03:20:04",
"url": "https://files.pythonhosted.org/packages/3f/66/fc5cc336df54db749de77ad3f37ab3cfca6751da71f4617baad7d50de7ef/plogs-0.1.4.tar.gz"
}
],
"0.1.5": [
{
"comment_text": "",
"digests": {
"md5": "2a3abe5cf33e2430d8a857b8efe08b90",
"sha256": "d8da6c008e5a537af1c84526273e0c4c2e5685f054a46787bef6aa8c2aa6dfb5"
},
"downloads": -1,
"filename": "plogs-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "2a3abe5cf33e2430d8a857b8efe08b90",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6985,
"upload_time": "2019-03-04T21:25:08",
"url": "https://files.pythonhosted.org/packages/df/07/d62deb02046265a9af6be57ac3b750b19ec2798612e1f62eefd354eb4d0d/plogs-0.1.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "2a3abe5cf33e2430d8a857b8efe08b90",
"sha256": "d8da6c008e5a537af1c84526273e0c4c2e5685f054a46787bef6aa8c2aa6dfb5"
},
"downloads": -1,
"filename": "plogs-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "2a3abe5cf33e2430d8a857b8efe08b90",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6985,
"upload_time": "2019-03-04T21:25:08",
"url": "https://files.pythonhosted.org/packages/df/07/d62deb02046265a9af6be57ac3b750b19ec2798612e1f62eefd354eb4d0d/plogs-0.1.5.tar.gz"
}
]
}