{
"info": {
"author": "Munchii",
"author_email": "contact@munchii.me",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3"
],
"description": "# DavesLogger\n> A simple but in depth logger for Python, Customize by Composition.\n\nThe idea for this tool is composing logging functions, so you can make the logs look exactly how you want or need them to.\n\nDave's logger3, but written in Python\n\n# Usage\nYou just import the package, and call log.\n```py\nfrom DavesLogger import Log\n\nLog ('Hello, World!') ()\n\n# This would print:\n# Hello, World!\n```\n\nThat's not interesting, lets compose a simple prefix in front of the message.\n```py\nfrom DavesLogger import Log\n\nPrefixed = Log ().Prefix ('[DEBUG] ')\n\nPrefixed ('Hello World, Debug Edition')\n\n# This would print:\n# [DEBUG] Hello World, Debug Edition\n```\n\nYou can also chain the logging modifiers\n```py\nfrom DavesLogger import Log\n\nPrefixed = Log ().Prefix ('[DEBUG] ').Suffix (' [SUFFIX])\n\nPrefixed ('Hello World, Debug Edition')\n\n# This would print:\n# [DEBUG] Hello World, Debug Edition [SUFFIX]\n```\n\nThere are also a bunch of built in formatters, and colors. Colors are based on the `colorama` module, so you can use their api of chaining properties.\n```py\nfrom DavesLogger import Log, Color\n\nPrefixed = Log ().Prefix (Color.LightRed + '[DEBUG] ').Suffix (Color.LightGreen + ' [SUFFIX])\n\nPrefixed (Color.Blue + 'Hello World, Debug Edition')\n\n# This would print:\n# [DEBUG] Hello World, Debug Edition [SUFFIX]\n# But colored ^^\n```\n\nOr you can call some premade logs\n```py\nfrom DavesLogger import Logs\n\nMyLog = Logs.Debug\nMyLog ()\n\n# This would print:\n# [DEBUG] DEBUG MESSAGE\n# But colored ^^\n```\n\nYou can event also change the text of premade logs!\n```py\nfrom DavesLogger import Logs\n\nMyLog = Logs.Debug\nMyLog ('My custom debug message')\n\n# This would print:\n# [DEBUG] My custom debug message\n# But colored ^^\n```\n\n# Log Object\nA log object has the following attributes:\n- Message\n- IPrefix\n- ISuffix\n\nAnd the following functions:\n- Template\n- Prefix\n- Suffix\n\nHow the attributes work\n```py\nfrom DavesLogger import Log\n\nMyLog = Log ()\nMyLog.Message = 'Hello!'\nMyLog.IPrefix = '[Test] '\nMyLog ()\n\n# This would print:\n# [Test] Hello!\n```\n\nThe template function lets you load specific settings for your log\n```py\nfrom DavesLogger import Log, Logs\n\nMyLog = Log ().Template (Logs.Debug)\n# This is the same as doing:\nMyLog = Logs.Debug\n```\n\nThe `Prefix` and `Suffix` function appends a new prefix or suffix to the current logs prefix or suffix.\n\n# Format\nFormat attributes:\n- Time :: The current time\n- Date :: The current date\n- FullDate :: The current date and time\n- Platform :: All info about the OS\n- System :: The OS\n- Release :: The release of the OS\n- Version :: The version of the OS\n\nExample use of the attribues:\n```py\nfrom DavesLogger import Logs, Format\n\nMyLog = Logs.Server.Prefix (f'[{Format.Time}] ')\nMyLog ()\n\n# This would print:\n# [SERVER] [20:57:18.633029] SERVER MESSAGE\n# But colored ^^\n# *The time may vary!*\n```\n\nYou can also use the Formats `Format` function\n```py\nfrom DavesLogger import Logs, Format, Color\n\nMyLog = Logs.Server.Prefix (Format.Format (f'[{Format.Time}] ', Color.Red))\nMyLog ()\n\n# This would print:\n# [SERVER] [20:57:18.633029] SERVER MESSAGE\n# But colored ^^\n# *The time may vary!*\n```\n\n# Colors\n- Reset\n- End (Same as Reset)\n- White\n- LightGray\n- Gray\n- Black\n- Red\n- LightRed\n- Blue\n- LightBlue\n- Green\n- LightGreen\n- Yellow\n- LightYellow\n- Purple\n- LightPurple\n- Cyan\n\n# Premade Logs\n- Debug :: `[DEBUG] DEBUG MESSAGE` >> The Prefix is LightPurple\n- Warning :: `[WARNING] WARNING MESSAGE` >> The Prefix is LightYellow\n- Error :: `[ERROR] ERROR MESSAGE` >> The Prefix is LightRed\n- Success :: `[SUCCESS] SUCCESS MESSAGE` >> The Prefix is LightGreen\n- Server :: `[SERVER] SERVER MESSAGE` >> The prefix is LightBlue",
"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/Dmunch04/DavesLogger",
"keywords": "simple logger for python",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "DavesLogger",
"package_url": "https://pypi.org/project/DavesLogger/",
"platform": "",
"project_url": "https://pypi.org/project/DavesLogger/",
"project_urls": {
"Homepage": "https://github.com/Dmunch04/DavesLogger"
},
"release_url": "https://pypi.org/project/DavesLogger/1.1.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Simple logger for Python",
"version": "1.1.0"
},
"last_serial": 5286592,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "ff6031547924d059d577538aaa3b0c0f",
"sha256": "126d10fa52ff5ac8089ed4c3d94611f360a266b11b30f0c020c1aa695b19ce78"
},
"downloads": -1,
"filename": "DavesLogger-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "ff6031547924d059d577538aaa3b0c0f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2590,
"upload_time": "2019-05-17T21:55:46",
"url": "https://files.pythonhosted.org/packages/79/12/0f3ed31fec8758331cf4bd78417c74593c7d011ad2c2961414bff77d12a6/DavesLogger-1.0.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "429c2b3a693a025a946a3aadae454bbc",
"sha256": "1e17aca98caa7009fea9da669fe5c8044ba6f98b467006e8793021527cd5b65d"
},
"downloads": -1,
"filename": "DavesLogger-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "429c2b3a693a025a946a3aadae454bbc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3422,
"upload_time": "2019-05-17T22:15:21",
"url": "https://files.pythonhosted.org/packages/1a/8c/4e2037ac851243c3ef274ce6e0df1c2aece8b2cd1d2d8391ff07c4847fe9/DavesLogger-1.0.1.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "d0bd1867a51971d615f4121fab990acf",
"sha256": "78fd03bc4eb843560eb631f50bafa2cae7c52f2ca4bb223e7ce4a5c1154f8476"
},
"downloads": -1,
"filename": "DavesLogger-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d0bd1867a51971d615f4121fab990acf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4559,
"upload_time": "2019-05-18T20:48:03",
"url": "https://files.pythonhosted.org/packages/e3/25/62a5d8ee2886b4eb4f7ba31704c5cc20b323c511fee1bd45fc06e5a6d473/DavesLogger-1.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "d0bd1867a51971d615f4121fab990acf",
"sha256": "78fd03bc4eb843560eb631f50bafa2cae7c52f2ca4bb223e7ce4a5c1154f8476"
},
"downloads": -1,
"filename": "DavesLogger-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d0bd1867a51971d615f4121fab990acf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4559,
"upload_time": "2019-05-18T20:48:03",
"url": "https://files.pythonhosted.org/packages/e3/25/62a5d8ee2886b4eb4f7ba31704c5cc20b323c511fee1bd45fc06e5a6d473/DavesLogger-1.1.0.tar.gz"
}
]
}