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
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)
Metadata
Release files for log-config 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| log_config-2.1.1.tar.gz | 18.2 kB | Without provenance | Details for log_config-2.1.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| log_config-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for log_config-2.1.1-py3-none-any.whl |
| log_config-2.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for log_config-2.1.1-py2.py3-none-any.whl |
Total release size: 55.9 kB
Release files / log_config-2.1.1.tar.gz
| Download URL | log_config-2.1.1.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8923673189bab84751e58e1eb4b37d81a098211cd4be1708b433e4ee518ee9dc
|
|
BLAKE2b-256 checksum How to use checksums |
74f7926284a97cfe45e200c490d6a4cf00062278097c6dc53d342b8ad9d6ed12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / log_config-2.1.1-py3-none-any.whl
| Download URL | log_config-2.1.1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2f58c937ab6261fa7071ac6741962363f36d3117f39d7c86a834be916457374
|
|
BLAKE2b-256 checksum How to use checksums |
3806e0ed8a9974e0654177b5bdba05a133032dce39a4d968465aa39b4fded4eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / log_config-2.1.1-py2.py3-none-any.whl
| Download URL | log_config-2.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
98d9ad5ef23f0abb31e6d3cadb6322f933e498bb3d3c9a79b03563bed85efbaa
|
|
BLAKE2b-256 checksum How to use checksums |
323af67fe099212581ea29c3ef7dbefb8a9891782f371af8754622658a3d5054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for log-config 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.