logconf
Setting up logging in Python is verbose and error prone. This library aims to fix that, without replacing the standard library logging entirely.
import logging
from logconf import global_logconf
with global_logconf() as logger:
# simple example:
logger.log_to_console_if_interactive(level=logging.DEBUG)
if os.getenv('LOG_DEST'): # can be "stdout" or "stderr"
logger.log_to_file(os.getenv('LOG_DEST'), level=os.getenv('LOG_LEVEL'))
# more fine-grained control:
logger.log_json_to_file('/var/log/myapp.jsonlog', level=logging.WARNING)
logger.log_json_to_file('/var/log/myapp_debug.jsonlog', level=logging.DEBUG)
# configure sub-loggers:
with logger.logger('urllib3') as sublogger:
sublogger.level = logging.WARNING
with logger.logger('myapp.security') as sublogger:
sublogger.log_to_file('/var/log/myapp.security.log', level=logging.INFO)
Metadata
Release files for logconf 0.2.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 | |
|---|---|---|---|---|
| logconf-0.2.1.tar.gz | 4.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logconf-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / logconf-0.2.1.tar.gz
| Download URL | logconf-0.2.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbb42ca04128564fe3b6fe85ed74e399c314cef19eb8df8e43e5d772c4b8b0fb
|
|
BLAKE2b-256 checksum How to use checksums |
4bef7fceaac629cc4d42c817de747bab00fdc5c8b7aaf2e4b947735188fd8459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.11.4 CPython/3.7.0 Linux/4.17.0-0.bpo.1-amd64
|
Release files / logconf-0.2.1-py3-none-any.whl
| Download URL | logconf-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db4de70c54ec34a3d045dba2bb1558c5864c34d2ea802e00377bdb9b8d220067
|
|
BLAKE2b-256 checksum How to use checksums |
4bed91e7b4cd0c47b0976aea62273e486977bf54c9e457b9a5db2413ba37f7dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.11.4 CPython/3.7.0 Linux/4.17.0-0.bpo.1-amd64
|
Security for logconf 0.2.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.