Name | bb-simplelogger JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Custom logger class using the builtin logging module |
upload_time | 2024-09-07 02:25:11 |
maintainer | None |
docs_url | None |
author | Erik Beebe |
requires_python | <4.0,>=3.12 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SimpleLogger
> Custom logger class using the builtin logging module
- Simplifies logging to a file
- Adds color formatting
- Adds ability to set verbosity through environment variable 'BBLOGGER_VERBOSITY'
### Logger class
```python
class SimpleLogger( logging.getLoggerClass() ):
"""
All options and keyword arguments are optional
Arguments:
'name': str - name given to logger
'level': int [1-5] - terminal output logging level - default is 3
Keyword Arguments:
'date_fmt': str ['%H:%M:%S'] - date format string
'html_theme': str ['plain'] - html theme to use when writing html or pdf
- see SimpleLogger.view_html_themes() to print examples
'terminal_output': bool [True] - whether or not to output logs to terminal
'logfile': str - plaintext log file to write in realtime
'overwrite': bool [False] - overwrite logfile at initial start of program if existing
'logfile_level': int [1-4] - limit logs at or above level given - default is 1
'logfile_title': str - prepend text to logfile (shows date and time only by default)
- also applies to html/pdf if used
'to_html': str [path] - write logs to an html file at exit of program
'to_pdf': bool - use with 'to_html' to instead save a pdf
- REQUIREMENT: chrome or chromium and bash in system path
"""
from simplelogger import SimpleLogger
log = SimpleLogger( __name__, 2, logfile = "/home/user/log/my-logfile" )
#
# Setting level does not effect log file
# Log file recieves all logs by default
#
```
### Changelog
- v0.1.0
- initial release
Raw data
{
"_id": null,
"home_page": null,
"name": "bb-simplelogger",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Erik Beebe",
"author_email": "beebeapps_debugging@tuta.io",
"download_url": "https://files.pythonhosted.org/packages/0d/bb/db4c7fccfa049c36db1c8829a6618a6f5f9a67bc59528fac6f238b8c7e59/bb_simplelogger-0.1.0.tar.gz",
"platform": null,
"description": "# SimpleLogger\n\n> Custom logger class using the builtin logging module\n\n- Simplifies logging to a file\n- Adds color formatting\n- Adds ability to set verbosity through environment variable 'BBLOGGER_VERBOSITY'\n\n### Logger class\n\n```python\n\nclass SimpleLogger( logging.getLoggerClass() ):\n\n \"\"\"\n All options and keyword arguments are optional\n\n Arguments:\n 'name': str - name given to logger\n 'level': int [1-5] - terminal output logging level - default is 3\n\n Keyword Arguments:\n 'date_fmt': str ['%H:%M:%S'] - date format string\n 'html_theme': str ['plain'] - html theme to use when writing html or pdf\n - see SimpleLogger.view_html_themes() to print examples\n 'terminal_output': bool [True] - whether or not to output logs to terminal\n 'logfile': str - plaintext log file to write in realtime\n 'overwrite': bool [False] - overwrite logfile at initial start of program if existing\n 'logfile_level': int [1-4] - limit logs at or above level given - default is 1\n 'logfile_title': str - prepend text to logfile (shows date and time only by default)\n - also applies to html/pdf if used\n 'to_html': str [path] - write logs to an html file at exit of program\n 'to_pdf': bool - use with 'to_html' to instead save a pdf\n - REQUIREMENT: chrome or chromium and bash in system path\n \"\"\"\n\n\nfrom simplelogger import SimpleLogger\nlog = SimpleLogger( __name__, 2, logfile = \"/home/user/log/my-logfile\" )\n\n#\n# Setting level does not effect log file\n# Log file recieves all logs by default\n#\n\n```\n\n### Changelog\n\n- v0.1.0\n - initial release\n",
"bugtrack_url": null,
"license": null,
"summary": "Custom logger class using the builtin logging module",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b18831d98a253aa5de20a403e5a6855e896ec1d6824dc178554d23912d414360",
"md5": "93c814d108ccca90a6071d954a1ee724",
"sha256": "87887fbd59e01f1b3833f90f56a4b149d3e0045224056c5e4a34348b9c5cb787"
},
"downloads": -1,
"filename": "bb_simplelogger-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "93c814d108ccca90a6071d954a1ee724",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 1113948,
"upload_time": "2024-09-07T02:25:09",
"upload_time_iso_8601": "2024-09-07T02:25:09.116831Z",
"url": "https://files.pythonhosted.org/packages/b1/88/31d98a253aa5de20a403e5a6855e896ec1d6824dc178554d23912d414360/bb_simplelogger-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0dbbdb4c7fccfa049c36db1c8829a6618a6f5f9a67bc59528fac6f238b8c7e59",
"md5": "23425240c744163805defa81bc904a2c",
"sha256": "83108aff341246efab5bfeae4e5932519a8c350e9b00c14f34ab80e3ce94f15a"
},
"downloads": -1,
"filename": "bb_simplelogger-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "23425240c744163805defa81bc904a2c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 1113033,
"upload_time": "2024-09-07T02:25:11",
"upload_time_iso_8601": "2024-09-07T02:25:11.724016Z",
"url": "https://files.pythonhosted.org/packages/0d/bb/db4c7fccfa049c36db1c8829a6618a6f5f9a67bc59528fac6f238b8c7e59/bb_simplelogger-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-07 02:25:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "bb-simplelogger"
}