{ "info": { "author": "SamHDev", "author_email": "sam02h.huddart@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Cosmo Logger\nA Simple yet Nicely formatted Logger for all your Logging Needs. Made for the Cosmo Project\n\n## Key Features\n\n * Simple to Use. \n * Supports Colors\n * Configurable Styles\n\n\n\n## Installation\nYou can install via python's `pip` module:\n\nInstall with Offical Python Package Index:\n```bash\npython3 -m pip install cosmologger\n```\nor with this Git Respiratory\n```bash\npython3 -m pip install git+https://github.com/SamHDev/cosmologger.git\n```\n*Note for Noobies: If `python3` work then use `python`*\n\n\n\n## Usage\n\n##### Importing the Library\n\nYou can import the library with the following statement:\n```python\nimport cosmologger\n```\n\n##### Creating a Logging Object\n\nTo Start logging, create a logger object. \nThis can be placed in the module or in a class so it can be accessed around the project.\n```python\nlogger = cosmologger.Logger()\n```\n\nThe Logger Object can be created with options such `debug` and `app_name` as shown below: \n```python\nlogger = cosmologger.Logger(\n debug = True, # Enables Debug Print\n app_name = \"CORE APP\", # Set App Name to Print\n style = None, # Set Style Formating (Format Dict)\n color = None # Enable Color Print\n)\n```\n\n##### Logging Example\n\nTo output messages to the logger/console you can call the many functions found in the Logger Class.\n\nHere is a simple Example of each Method.\n\n```python\nlogger.info(\"This a 'Info' Message\")\nlogger.ok(\"This a 'Ok' Message\")\nlogger.warn(\"This a 'Warn' Message\")\nlogger.error(\"This a 'Error' Message\")\nlogger.fatal(\"This a 'Fatal' Message\")\nlogger.debug(\"This a 'Debug' Message\")\nlogger(\"This a 'Debug' Message but Simpler\")\nlogger.log(\"TEST\", \"This is a Custom Logging Output Type\")\n```\nThe above code would produce the resulting output:\n```\nmain> 10:03:18 [INFO] This a 'Info' Message\nmain> 10:03:18 [-OK-] This a 'Ok' Message\nmain> 10:03:18 [WARN] This a 'Warn' Message\nmain> 10:03:18 [ERRR] This a 'Error' Message\nmain> 10:03:18 [FATAL] This a 'Fatal' Message\nmain> 10:03:18 [Debug] This a 'Debug' Message\nmain> 10:03:18 [Debug] This a 'Debug' Message but Simpler\nmain> 10:03:18 [TEST] This is a Custom Logging Output Type\n```\n\n##### Logging Methods\n\n| Type | Output | Methods |\n| --- | --- | --- |\n| Info | `[INFO]` | `Logger.info(msg)` |\n| Ok | `[-OK-]` | `Logger.ok(msg)` |\n| Warning | `[WARN]` | `Logger.warn(msg)` `Logger.warning(msg)` |\n| Error | `[ERROR]` | `Logger.error(msg)` |\n| Fatal | `[FATL]` | `Logger.fatal(msg)` `Logger.critical(msg)` |\n| Debug | `[DBUG]` | `Logger.debug(msg)` `Logger(msg)` |\n\n###### Custom Logging\n\nCustom Logging Types is a simple as so:\n\n```python\nlogging.log(\"Custom Type\", \"Message\")\n```\n\n##### Sub Loggers (For Multiple Classes/Modules)\n\nA SubLogger can be used for classes/modules across large projects. \nThe `cosmoLogger.SubLogger` is a subclass of `cosmoLogger.Logger` and contains all the methods\nHowever, the class requires the `app_name` parameter and has the optinal `parent` paramater that\ncopies the settings from the 'parent' Logger Object.\n\nIt can be used like so:\n```python\nsublogger = logger.SubLogger(\"SUB APP\", parent=logger)\n```\n\n## License and Attributes\n\nCreated by Sam Huddart under alias [SamHDev](https://github.com/SamHDev/) for the [Blume Open Source Project](https://www.youtube.com/watch?v=oHg5SJYRHA0). `SamHDev/cosmologger` is licensed under the GNU General Public License v3.0 and is Open-Source as seen in [LICENSE](LICENSE). Commercial use, Modification and Distribution are permmited. Although credit is not necessary, it is much obliged. If you do wish to credit the author, please link the [respiratory](https://github.com/SamHDev/tcpnonblock/) and the author at [github](https://github.com/SamHDev/) or [website](https://samhdev.com). Thank you for using our work.\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/SamHDev/cosmologger/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cosmologger", "package_url": "https://pypi.org/project/cosmologger/", "platform": "", "project_url": "https://pypi.org/project/cosmologger/", "project_urls": { "Homepage": "https://github.com/SamHDev/cosmologger/" }, "release_url": "https://pypi.org/project/cosmologger/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A Nicely formatted Logger for the Cosmo Project", "version": "1.0.0" }, "last_serial": 5764189, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1fc8229a791d4b158bba2aade052a3c6", "sha256": "180264b73e85791b66b579517e4d8b7a810d3898deff43b81f07904470b62548" }, "downloads": -1, "filename": "cosmologger-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1fc8229a791d4b158bba2aade052a3c6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16611, "upload_time": "2019-08-31T10:59:11", "url": "https://files.pythonhosted.org/packages/ee/bf/892e15779753bb84ef62ba523ca8b2f03e8c63cec1c32adbcc1e114c7416/cosmologger-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a3ad95e70a261d5bb618cf3c04f5c0b", "sha256": "d27fb08803abb5d73d059df6e6d2a6e089bb2cda5afc5bfc2f07782c170c8ab7" }, "downloads": -1, "filename": "cosmologger-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8a3ad95e70a261d5bb618cf3c04f5c0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4199, "upload_time": "2019-08-31T10:59:14", "url": "https://files.pythonhosted.org/packages/b8/b0/892ae682ac1b592671034804bbb18d2e8b69706127cb469d3bb52cb6900e/cosmologger-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b4bc769b072def847fca328b1bd01f94", "sha256": "d606b0792c91fdf3c64531fa624f3f73db67ac53fc82c2a827c3d8ddb17f8d61" }, "downloads": -1, "filename": "cosmologger-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b4bc769b072def847fca328b1bd01f94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16609, "upload_time": "2019-08-31T12:10:36", "url": "https://files.pythonhosted.org/packages/41/b8/4c44222e864f915b82a613d7592ef2ca97c92a73d1360435194a52826e71/cosmologger-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50e472dfea95f1c922d4ed78de826878", "sha256": "75048477d4af3e1c4edc0a1eb6b444c6ad170148ce5fcda186c3493ca6c2605d" }, "downloads": -1, "filename": "cosmologger-1.0.0.tar.gz", "has_sig": false, "md5_digest": "50e472dfea95f1c922d4ed78de826878", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4188, "upload_time": "2019-08-31T12:10:39", "url": "https://files.pythonhosted.org/packages/0e/c6/efe80d11176d510ac80a32f28521eee6445c4332a728f4369fd38ad9b827/cosmologger-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4bc769b072def847fca328b1bd01f94", "sha256": "d606b0792c91fdf3c64531fa624f3f73db67ac53fc82c2a827c3d8ddb17f8d61" }, "downloads": -1, "filename": "cosmologger-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b4bc769b072def847fca328b1bd01f94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16609, "upload_time": "2019-08-31T12:10:36", "url": "https://files.pythonhosted.org/packages/41/b8/4c44222e864f915b82a613d7592ef2ca97c92a73d1360435194a52826e71/cosmologger-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50e472dfea95f1c922d4ed78de826878", "sha256": "75048477d4af3e1c4edc0a1eb6b444c6ad170148ce5fcda186c3493ca6c2605d" }, "downloads": -1, "filename": "cosmologger-1.0.0.tar.gz", "has_sig": false, "md5_digest": "50e472dfea95f1c922d4ed78de826878", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4188, "upload_time": "2019-08-31T12:10:39", "url": "https://files.pythonhosted.org/packages/0e/c6/efe80d11176d510ac80a32f28521eee6445c4332a728f4369fd38ad9b827/cosmologger-1.0.0.tar.gz" } ] }