{ "info": { "author": "Kant", "author_email": "kant@kantli.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# What does this package do\nTail log files on your server and report by email if error occurs.\n\nBy default, the regex pattern was set for default uwsgi logs.\n\n# Install\n```\npip install tail_uwsgi_log\n```\n\n# Usage\n```\ntail_uwsgi_log -c your_config_filepath.ini\n```\n\n# Configs\nThe config file provides infomations needed to send an email and log-files to tail.\n\nFor example:\n```ini\n; section name startswith 'log' would be interpreted as logfile config\n[log-myapp1]\n\n; log file path\nfilepath = your_log_filepath\n\n; wait_time for tail command, the thread will sleep and wait\n; the wait_time should be small if the server is busy and generates log lines quickly\nwait_time = 0.5\n\n; the regex pattern to read the log line, the line doesn't match this regex will be recorded as innormal\npattern = \n\n; mail settings\nmail_recipients = example1@example.com, example2@example.com\n\nmail_host = smtp.qq.com\nmail_port = 465\nmail_sender = your_email_address\nmail_password = your_password\n```\n\nTo tail several log files at the same time, we could set several sections on config files, the section name should start with 'log'.\n\nFor mail settings, we could use a section named 'mail' to set default value. The default value will be used if there is no keyword in log section.\n\nFor example:\n```ini\n[log-myapp1]\nfilepath = your_log_filepath1\nwait_time = 0.5\npattern = \nmail_recipients = example1@example.com, example2@example.com\n\n[log-myapp2]\nfilepath = your_log_filepath2\nwait_time = 1\npattern = \nmail_recipients = example3@example.com, example4@example.com\n\n[mail]\nmail_host = smtp.qq.com\nmail_port = 465\nmail_sender = your_email_address\nmail_password = your_password\n```\n\nThe default regex pattern to match the logline was for default uwsgi logs, which is:\n```python\npattern = r'''\\]\\ (?P.*?)\\ (.*)\\ {.*?}\\ \\[(?P.*?)\\]\\ (?PPOST|GET|DELETE|PUT|PATCH)\\s\n (?P[^ ]*?)\\ =>\\ generated\\ (?:.*?)\\ in\\ (?P\\d+)\\ msecs\\s\n \\(HTTP/[\\d.]+\\ (?P\\d+)\\)'''\n```\n\nThe '**resp_status**' in the pattern is important, which will be used as a signal.\n\nWhen the resp_status is **500**, an email will be sent with all innormal log lines recorded before.", "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/kant-li/uwsgi_log_analysis", "keywords": "uwsgi log", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "tail-uwsgi-log", "package_url": "https://pypi.org/project/tail-uwsgi-log/", "platform": "", "project_url": "https://pypi.org/project/tail-uwsgi-log/", "project_urls": { "Homepage": "https://github.com/kant-li/uwsgi_log_analysis" }, "release_url": "https://pypi.org/project/tail-uwsgi-log/0.0.3/", "requires_dist": null, "requires_python": ">=3.7", "summary": "Tail several uwsgi log files and send an email when error occurs.", "version": "0.0.3" }, "last_serial": 5974249, "releases": { "0.0.1a0": [ { "comment_text": "", "digests": { "md5": "79709f53fc93a5c93aceb709820520b9", "sha256": "7434b8ae6b1967c40c81b77fb3ffe9da2ec98c57415217c0896fd5a112bd2b5c" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.1a0-py3.7.egg", "has_sig": false, "md5_digest": "79709f53fc93a5c93aceb709820520b9", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 10278, "upload_time": "2019-10-14T08:33:34", "url": "https://files.pythonhosted.org/packages/62/cb/d49810b97bf890858d0c9cd8a6ebe4d6cb671a7580983617549c5dafdc9b/tail_uwsgi_log-0.0.1a0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "c5c73354e1cf8edf332b7be00e4b2618", "sha256": "fd29affcc319436d384b92be645437606a856c4a5dea316da8d7779311df1ac6" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.1a0.tar.gz", "has_sig": false, "md5_digest": "c5c73354e1cf8edf332b7be00e4b2618", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3783, "upload_time": "2019-10-14T08:33:37", "url": "https://files.pythonhosted.org/packages/64/77/07f2c3c679e883d1a10262f51c87abb8c125ec5ee2341bc26542a14aea30/tail_uwsgi_log-0.0.1a0.tar.gz" } ], "0.0.1b0": [ { "comment_text": "", "digests": { "md5": "57e9b2945f8525355068b9a281e34076", "sha256": "39c565b3041398de21c4f9f93cbfb4d10d2671098ac69440475e82ab8730edff" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.1b0-py3.7.egg", "has_sig": false, "md5_digest": "57e9b2945f8525355068b9a281e34076", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 11290, "upload_time": "2019-10-14T08:33:39", "url": "https://files.pythonhosted.org/packages/21/22/ef2940d25acb48bbd642981e911a11c990c42bf7674ff3d7527408ea2a0a/tail_uwsgi_log-0.0.1b0-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "9ea06b22f2cdf333e35b832369948015", "sha256": "d9c8b489701cd240df6d1a229c230568c632f2de21c58b9ee4222e8029ec69b8" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.1b0.tar.gz", "has_sig": false, "md5_digest": "9ea06b22f2cdf333e35b832369948015", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4052, "upload_time": "2019-10-14T08:33:40", "url": "https://files.pythonhosted.org/packages/da/2a/eb1a2c7f3e133ad8217143d0f763b923d7ee61c98697fc11fbf6d6c574b9/tail_uwsgi_log-0.0.1b0.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b7448ed1613fa2d05ace266d09d14ccd", "sha256": "0aae78b191d5d1876d67242f2f83ea9747058cb36c4e5dd5ddc40c7054711d12" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b7448ed1613fa2d05ace266d09d14ccd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 4222, "upload_time": "2019-10-14T08:40:20", "url": "https://files.pythonhosted.org/packages/f8/71/146708422a72a8a20b8ee3ae9b65c100ed781ffd96b5609e59e91758a347/tail_uwsgi_log-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "b3ccaba85588bf7799942d0ecf333d08", "sha256": "bce97c51821fd6cc4e046ce13448c6e3542f9342c9e9f10e8a5a17d11d4fc4f4" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.3.tar.gz", "has_sig": false, "md5_digest": "b3ccaba85588bf7799942d0ecf333d08", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 5112, "upload_time": "2019-10-15T01:09:10", "url": "https://files.pythonhosted.org/packages/6c/c3/1c5dee2d4987e6b661e55b0e8af0255c74bd686e8c152f87b0cece6e7030/tail_uwsgi_log-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b3ccaba85588bf7799942d0ecf333d08", "sha256": "bce97c51821fd6cc4e046ce13448c6e3542f9342c9e9f10e8a5a17d11d4fc4f4" }, "downloads": -1, "filename": "tail_uwsgi_log-0.0.3.tar.gz", "has_sig": false, "md5_digest": "b3ccaba85588bf7799942d0ecf333d08", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 5112, "upload_time": "2019-10-15T01:09:10", "url": "https://files.pythonhosted.org/packages/6c/c3/1c5dee2d4987e6b661e55b0e8af0255c74bd686e8c152f87b0cece6e7030/tail_uwsgi_log-0.0.3.tar.gz" } ] }