{ "info": { "author": "TinyBees", "author_email": "a598824322@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: Chinese (Simplified)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# Aelog\nAn simple, async, full package name path, log rotating, different colored log library.\n\naelog aims to make using python log as simple as possible. as a result, it drastically \nsimplifies using python logging.\n\naelog's design objectives:\n\n- Make using python log as simple as possible.\n- Output log contains the full package name path.\n- Provide asynchronous log output function, at the same time, contains common log output.\n- Output according to the log level to mark the different colors separately.\n- Provide a log file rotating, automatic backup.\n- Output to the terminal and file, default output to the terminal, if you don't provide the log file path.\n\n# Installing aelog\n- ```pip install aelog```\n\n# init aelog \n```\nimport aelog \n\napp = Flask(__name__)\n\naelog.init_app(app)\n# or \naelog.init_app(aelog_access_file='aelog_access_file.log', aelog_error_file='aelog_error_file.log', \n aelog_console=False)\n```\n# aelog config\nList of configuration keys that the aelog extension recognizes:\n\n\n| configuration key | the meaning of the configuration key |\n| ------ | ------ |\n| AELOG_ACCESS_FILE | Access file path, default None. |\n| AELOG_ERROR_FILE | Error file path, default None. |\n| AELOG_CONSOLE | Whether it is output at the terminal, default false. |\n| AELOG_MAX_BYTES | Log file size, default 50M. |\n| AELOG_BACKUP_COUNT | Rotating file count, default 5.|\n\n# Usage\n### simple using, not initialized.\n```\nimport aelog\n\ndef test_aelog_output_console():\n \"\"\"\n\n Args:\n\n Returns:\n\n \"\"\"\n aelog.debug(\"simple debug message\")\n aelog.info(\"simple info message\")\n aelog.warning(\"simple warning message\")\n aelog.error(\"simple error message\")\n aelog.critical(\"simple critical message\")\n try:\n 5 / 0\n except Exception as e:\n aelog.exception(e)\n```\nThis will output to the terminal. \n![console](https://raw.githubusercontent.com/tinybees/aelog/master/docs/output_console.png)\n- Different levels of logging, different color, the color is cyan, green, yellow, red and 'bold_red,bg_white' in turn.\n\n### To initialize, output log to file and terminal.\n```\nimport aelog\nfrom flask import Flask\n\napp = Flask(__name__)\n\naelog.init_app(app) # Output to the test.log file and terminal \n\ndef test_aelog_output_file():\n \"\"\"\n\n Args:\n\n Returns:\n\n \"\"\"\n aelog.debug(\"simple debug message\")\n aelog.info(\"simple info message\")\n aelog.warning(\"simple warning message\")\n aelog.error(\"simple error message\")\n aelog.critical(\"simple critical message\")\n try:\n 5 / 0\n except Exception as e:\n aelog.exception(e)\n```\nThis will output to the test.log file and terminal.\n![console](https://raw.githubusercontent.com/tinybees/aelog/master/docs/output_file.png)\n- Automatic output is greater than the error information to the 'test_error.log' file.\n- Different levels of logging, different color, the color is cyan, green, yellow, red and 'bold_red,bg_white' in turn.\n\n### To initialize, asynchronous output log to file and terminal.\n```\nimport asyncio\nimport aelog\nfrom sanic import Sanic\n\napp = Sanic(__name__)\n\naelog.init_aelog(app) # Output to the test.log file and terminal \n\nasync def test_async_output():\n await aelog.async_debug(\"simple debug message\")\n await aelog.async_info(\"simple info message\")\n await aelog.async_warning(\"simple warning message\")\n await aelog.async_error(\"simple error message\")\n await aelog.async_critical(\"simple critical message\")\n try:\n 5 / 0\n except Exception as e:\n await aelog.async_exception(e)\n\nif \"__name__\"==\"__main__\":\n loop = asyncio.get_event_loop()\n loop.run_until_complete(test_async_output())\n```\nThis will output to the test.log file and terminal.\n![console](https://raw.githubusercontent.com/tinybees/aelog/master/docs/async_output.png)\n- Automatic output is greater than the error information to the 'test_error.log' file. \n- Different levels of logging, different color, the color is cyan, green, yellow, red and 'bold_red,bg_white' in turn.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tinybees/aelog", "keywords": "log", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aelog", "package_url": "https://pypi.org/project/aelog/", "platform": "", "project_url": "https://pypi.org/project/aelog/", "project_urls": { "Homepage": "https://github.com/tinybees/aelog" }, "release_url": "https://pypi.org/project/aelog/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "An simple, async, full package name path, log rotating, different colored log library.", "version": "1.0.3" }, "last_serial": 4629062, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "b3992db80484f1b03b3efae1ee8ba923", "sha256": "bac6e059e1dd5b57367d3347b2cb17cf5e1df2dc85413bdc963f8036e2d09718" }, "downloads": -1, "filename": "aelog-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b3992db80484f1b03b3efae1ee8ba923", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 6950, "upload_time": "2018-03-28T02:10:15", "url": "https://files.pythonhosted.org/packages/e2/dd/b92f54791c36fa3f7a01ceac2600eccd410d45f45fda1b8c0122361305d9/aelog-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "310619d2cbfaaa433f4504a33ed623a9", "sha256": "12a46a4125b2be5c4414381d4cfb7d2886e5057544ba59dbc1e9aacd3f27a27b" }, "downloads": -1, "filename": "aelog-1.0.1.tar.gz", "has_sig": false, "md5_digest": "310619d2cbfaaa433f4504a33ed623a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 5200, "upload_time": "2018-03-27T11:06:00", "url": "https://files.pythonhosted.org/packages/b4/2f/46d99ac1d53112da28238aaed777615e01bf5f8742fa659e4e8bbe1c8fcb/aelog-1.0.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "8576d8731d54562d1caba30bbff6a752", "sha256": "e00c109d8159172fb384450c2417a3e3452c37acc18b20547335724129c31a2f" }, "downloads": -1, "filename": "aelog-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8576d8731d54562d1caba30bbff6a752", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6597, "upload_time": "2018-12-23T08:21:40", "url": "https://files.pythonhosted.org/packages/60/e3/34539d01b4726a269527312838cbd4cd3c6394df977ffc328b4b09059f54/aelog-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4794f4b68fd91ad349469de22d2c400", "sha256": "e283110b2a089d861c112ec98ad6af7345ffb3089a2ba285a94974d88fafbd00" }, "downloads": -1, "filename": "aelog-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c4794f4b68fd91ad349469de22d2c400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6399, "upload_time": "2018-12-23T08:21:20", "url": "https://files.pythonhosted.org/packages/d7/99/0616c422617111ce630c9bb3e84b32875a02f8be065fcc84d5a8148e8416/aelog-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8576d8731d54562d1caba30bbff6a752", "sha256": "e00c109d8159172fb384450c2417a3e3452c37acc18b20547335724129c31a2f" }, "downloads": -1, "filename": "aelog-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8576d8731d54562d1caba30bbff6a752", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6597, "upload_time": "2018-12-23T08:21:40", "url": "https://files.pythonhosted.org/packages/60/e3/34539d01b4726a269527312838cbd4cd3c6394df977ffc328b4b09059f54/aelog-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4794f4b68fd91ad349469de22d2c400", "sha256": "e283110b2a089d861c112ec98ad6af7345ffb3089a2ba285a94974d88fafbd00" }, "downloads": -1, "filename": "aelog-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c4794f4b68fd91ad349469de22d2c400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6399, "upload_time": "2018-12-23T08:21:20", "url": "https://files.pythonhosted.org/packages/d7/99/0616c422617111ce630c9bb3e84b32875a02f8be065fcc84d5a8148e8416/aelog-1.0.3.tar.gz" } ] }