log-config


Namelog-config JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/amazingcoderpro/log_config/
SummaryProvide a function for anyone who want to configure log parameters easily, just call init_log_config when your app start up, the you can use the module of logging which build-in python3 without any other configture. This module support TimeRotatingHandler, MultiProcessTimeRotatingHandler, RotatingFileHandler and SMTPHandler and You can change the configuration parameters according to your requirements.
upload_time2024-11-14 03:10:14
maintainerWu Charles
docs_urlNone
authorWu Charles
requires_pythonNone
licenseBSD License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================
Log_Config
====================

Provide a function for anyone who want to configure log parameters easily, just call init_log_config when your app start up, the you can use the module of logging which build-in python3 without any other configtur. This module support ConsoleHandler, RotatingFileHandler and SMTPHandler and You can change the configuration parameters according to your requirements.


Meta
----

* Author: Wu Charles
* Email:  wcadaydayup@163.com
* Maintainer: Wu Charles
* Email: wcadaydayup@163.com
* Status: active development, stable, maintained


Source
------
https://github.com/amazingcoderpro/log_config


Installation
------------
Simply run the following from within a virtualenv::

	$ pip install log_config
	
	or

    $ pip install git+https://github.com/wcadaydayup/log_config


Usage
-----
Import the log config function in anywhere you want use logging which build-in Python3::

    from log_config.log_config import init_log_config

Call init_log_config() when your application start up, of course you can modify log file path, log level and so on by import other variable from log_config.log_config::

    init_log_config()

Log confiture is ready, you can use logging module without any other configture::

    import logging
	logger = logging.getLogger()
	logger.debug("this is a message of debug level.")

Then, you will see you output message in console and log file which in your current directory::

    configure_installed_apps_logger(logging.INFO, verbose=True, filename='django-project.log')

You can also receive email notify if call init_log_config(use_mail=True), of course you should provide correct email parameters::

	import log_config.log_config as lf
	lf.EMAIL_HOST = "xxx.smtp.com"
	lf.FROM = "youraccount@xx.com"
	lf.TO = "a@xx.com;b@xx.com"
	
	...
	
    init_log_config(use_mail=True)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/amazingcoderpro/log_config/",
    "name": "log-config",
    "maintainer": "Wu Charles",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "wcadaydayup@163.com",
    "keywords": null,
    "author": "Wu Charles",
    "author_email": "wcadaydayup@163.com",
    "download_url": "https://files.pythonhosted.org/packages/74/f7/926284a97cfe45e200c490d6a4cf00062278097c6dc53d342b8ad9d6ed12/log_config-2.1.1.tar.gz",
    "platform": "all",
    "description": "====================\nLog_Config\n====================\n\nProvide a function for anyone who want to configure log parameters easily, just call init_log_config when your app start up, the you can use the module of logging which build-in python3 without any other configtur. This module support ConsoleHandler, RotatingFileHandler and SMTPHandler and You can change the configuration parameters according to your requirements.\n\n\nMeta\n----\n\n* Author: Wu Charles\n* Email:  wcadaydayup@163.com\n* Maintainer: Wu Charles\n* Email: wcadaydayup@163.com\n* Status: active development, stable, maintained\n\n\nSource\n------\nhttps://github.com/amazingcoderpro/log_config\n\n\nInstallation\n------------\nSimply run the following from within a virtualenv::\n\n\t$ pip install log_config\n\t\n\tor\n\n    $ pip install git+https://github.com/wcadaydayup/log_config\n\n\nUsage\n-----\nImport the log config function in anywhere you want use logging which build-in Python3::\n\n    from log_config.log_config import init_log_config\n\nCall init_log_config() when your application start up, of course you can modify log file path, log level and so on by import other variable from log_config.log_config::\n\n    init_log_config()\n\nLog confiture is ready, you can use logging module without any other configture::\n\n    import logging\n\tlogger = logging.getLogger()\n\tlogger.debug(\"this is a message of debug level.\")\n\nThen, you will see you output message in console and log file which in your current directory::\n\n    configure_installed_apps_logger(logging.INFO, verbose=True, filename='django-project.log')\n\nYou can also receive email notify if call init_log_config(use_mail=True), of course you should provide correct email parameters::\n\n\timport log_config.log_config as lf\n\tlf.EMAIL_HOST = \"xxx.smtp.com\"\n\tlf.FROM = \"youraccount@xx.com\"\n\tlf.TO = \"a@xx.com;b@xx.com\"\n\t\n\t...\n\t\n    init_log_config(use_mail=True)\n\n\n",
    "bugtrack_url": null,
    "license": "BSD License",
    "summary": "Provide a function for anyone who want to configure log parameters easily, just call init_log_config when your app start up, the you can use the module of logging which build-in python3 without any other configture. This module support TimeRotatingHandler, MultiProcessTimeRotatingHandler, RotatingFileHandler and SMTPHandler and You can change the configuration parameters according to your requirements.",
    "version": "2.1.1",
    "project_urls": {
        "Homepage": "https://github.com/amazingcoderpro/log_config/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "323af67fe099212581ea29c3ef7dbefb8a9891782f371af8754622658a3d5054",
                "md5": "8d57eb2560539d7f99713ccb301b9332",
                "sha256": "98d9ad5ef23f0abb31e6d3cadb6322f933e498bb3d3c9a79b03563bed85efbaa"
            },
            "downloads": -1,
            "filename": "log_config-2.1.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d57eb2560539d7f99713ccb301b9332",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 18823,
            "upload_time": "2024-11-14T03:10:10",
            "upload_time_iso_8601": "2024-11-14T03:10:10.622105Z",
            "url": "https://files.pythonhosted.org/packages/32/3a/f67fe099212581ea29c3ef7dbefb8a9891782f371af8754622658a3d5054/log_config-2.1.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3806e0ed8a9974e0654177b5bdba05a133032dce39a4d968465aa39b4fded4eb",
                "md5": "c2cb2a37a67cd7dc3c6b8533cca6c69e",
                "sha256": "c2f58c937ab6261fa7071ac6741962363f36d3117f39d7c86a834be916457374"
            },
            "downloads": -1,
            "filename": "log_config-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c2cb2a37a67cd7dc3c6b8533cca6c69e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18818,
            "upload_time": "2024-11-14T03:10:12",
            "upload_time_iso_8601": "2024-11-14T03:10:12.561733Z",
            "url": "https://files.pythonhosted.org/packages/38/06/e0ed8a9974e0654177b5bdba05a133032dce39a4d968465aa39b4fded4eb/log_config-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74f7926284a97cfe45e200c490d6a4cf00062278097c6dc53d342b8ad9d6ed12",
                "md5": "beb96ca397f5b9d17bdb47cd74d94930",
                "sha256": "8923673189bab84751e58e1eb4b37d81a098211cd4be1708b433e4ee518ee9dc"
            },
            "downloads": -1,
            "filename": "log_config-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "beb96ca397f5b9d17bdb47cd74d94930",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18246,
            "upload_time": "2024-11-14T03:10:14",
            "upload_time_iso_8601": "2024-11-14T03:10:14.523053Z",
            "url": "https://files.pythonhosted.org/packages/74/f7/926284a97cfe45e200c490d6a4cf00062278097c6dc53d342b8ad9d6ed12/log_config-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 03:10:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amazingcoderpro",
    "github_project": "log_config",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "log-config"
}
        
Elapsed time: 0.96272s