Env Logger
A replacement for the standard library logging.basicConfig, with some extra bells and whistles.
Value proposition
Nice defaults
It uses subjectively nicer defaults e.g. by using a handler that colors the output.
Multiple configuration sources
It allows users to override the configuration environment variables e.g. like
LOG_LEVEL=DEBUG \
LOG_FORMAT='%(levelname)8s %(message)s' \
env_logger demo
In general, the name of the environment variable follows the name of the basicConfig parameter and takes the same values.
Ecosystem
The package is designed to be compatible with rich e.g. like
import logging
import env_logger
import rich.logging
env_logger.configure(handlers=[rich.logging.RichHandler()])
logging.getLogger(__name__).info("Hello!")
Contribute
For Linux like environments the ambition is that setting up a development environment should be as easy as
source ./init_env.sh
make install_deps_py
Important workflows are documented in the Makefile and can be listed with make help.
Prerequisites
- Python e.g. by
- installing pyenv following these instructions, and
- installing the targeted python version(s) like
pyenv install
Metadata
Release files for env-logger 0.4.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 | |
|---|---|---|---|
| env_logger-0.4.1.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| env_logger-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / env_logger-0.4.1.tar.gz
| Download URL | env_logger-0.4.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8713382e2a4a0fdd820fe2d3297933d836c88338356f70440b40a9b34ddd834
|
|
BLAKE2b-256 checksum How to use checksums |
158e47cf2df1dd25c80bdc4b7bc6de28dc4499721e3ff8a81d87e7290b5ec0a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / env_logger-0.4.1-py3-none-any.whl
| Download URL | env_logger-0.4.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06669202cfb558b639e81ea5069d2dbc4d54dbc87d8447bdbb48e3d4e5a8ba91
|
|
BLAKE2b-256 checksum How to use checksums |
b3f553afa0e5f3b960d8ac936a4a075664c0c343299298736cd6d7536fad4a6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|