# whylog
This is an library to print color-coded log messages to the terminal. It prints in the following format.
`TIME [LOG TYPE] (file names) > (path of the call|line no): Message.`
## Log Levels
Print or Save to a log file.
| Log Level | Log Type | Print Color | Background Color |
| ---------:| ------------- | ----------- | ---------------- |
| 0 | Emergency | Black | Red |
| 1 | Alert | Black | Yellow |
| 2 | Critical | Black | Magenta |
| 3 | Error | Red | No Color |
| 4 | Warning | Yellow | No Color |
| 5 | Notice | White | Blue |
| 6 | Informational | White | No Color |
| 7 | Debug | Cyan | No Color |
| 8 | None | NA | NA |
## Usage
### Code
```python
from whylog import Log
def main():
test()
def test():
log = Log(loglevel=8)
log.emergency('Test emergency Print by importing')
log.alert('Test alert Print by importing')
log.critical('Test crtical Print by importing')
log.error('Test error Print by importing')
log.warning('Test warning Print by importing')
log.notice('Test notice Print by importing')
log.debug('Test Debug Print by importing')
log.info('Test info Print by importing')
if __name__ == '__main__':
main()
```
### Output

Raw data
{
"_id": null,
"home_page": "https://github.com/iamlrk/ylog",
"name": "whyylog",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,logging,log,print",
"author": "",
"author_email": "<lepakshiramkiran@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ba/42/6dfb9faf5d50c6dc135e1c1f2f15e8dac4cffbcd38d407b138adca15de85/whyylog-0.2.tar.gz",
"platform": null,
"description": "# whylog\n\nThis is an library to print color-coded log messages to the terminal. It prints in the following format.\n\n`TIME [LOG TYPE] (file names) > (path of the call|line no): Message.`\n\n## Log Levels\n\nPrint or Save to a log file.\n| Log Level | Log Type | Print Color | Background Color |\n| ---------:| ------------- | ----------- | ---------------- |\n| 0 | Emergency | Black | Red |\n| 1 | Alert | Black | Yellow |\n| 2 | Critical | Black | Magenta |\n| 3 | Error | Red | No Color |\n| 4 | Warning | Yellow | No Color |\n| 5 | Notice | White | Blue |\n| 6 | Informational | White | No Color |\n| 7 | Debug | Cyan | No Color |\n| 8 | None | NA | NA |\n\n## Usage\n\n### Code\n\n```python\nfrom whylog import Log\n\ndef main():\n test()\n\ndef test():\n log = Log(loglevel=8)\n log.emergency('Test emergency Print by importing')\n log.alert('Test alert Print by importing')\n log.critical('Test crtical Print by importing')\n log.error('Test error Print by importing')\n log.warning('Test warning Print by importing')\n log.notice('Test notice Print by importing')\n log.debug('Test Debug Print by importing')\n log.info('Test info Print by importing')\n\nif __name__ == '__main__':\n main()\n```\n\n### Output\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Prints out a log message to terminal in color",
"version": "0.2",
"project_urls": {
"Homepage": "https://github.com/iamlrk/ylog"
},
"split_keywords": [
"python",
"logging",
"log",
"print"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bbfb4297602e818b04c75d5e36f1a20032b3decc0d6fbbea313beecf9a0ebf96",
"md5": "d28e1c81a44f6b57498ab7b1721f449a",
"sha256": "7876d64b85bfcd236186a7e87c11c2eb290627c27659846ff760189f63c581b0"
},
"downloads": -1,
"filename": "whyylog-0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d28e1c81a44f6b57498ab7b1721f449a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15825,
"upload_time": "2023-07-05T14:51:11",
"upload_time_iso_8601": "2023-07-05T14:51:11.172703Z",
"url": "https://files.pythonhosted.org/packages/bb/fb/4297602e818b04c75d5e36f1a20032b3decc0d6fbbea313beecf9a0ebf96/whyylog-0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ba426dfb9faf5d50c6dc135e1c1f2f15e8dac4cffbcd38d407b138adca15de85",
"md5": "d93de61d1092620de2c400dbc0d3adad",
"sha256": "0de4ccbbe65e32dfeb28c5c719ce04a1d0e7d5180554b2ba902f708bd5dac860"
},
"downloads": -1,
"filename": "whyylog-0.2.tar.gz",
"has_sig": false,
"md5_digest": "d93de61d1092620de2c400dbc0d3adad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15495,
"upload_time": "2023-07-05T14:51:12",
"upload_time_iso_8601": "2023-07-05T14:51:12.819367Z",
"url": "https://files.pythonhosted.org/packages/ba/42/6dfb9faf5d50c6dc135e1c1f2f15e8dac4cffbcd38d407b138adca15de85/whyylog-0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-05 14:51:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iamlrk",
"github_project": "ylog",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "whyylog"
}