The easy way to configure logging
Project description
Env Logger
A replacement for the standard library logging.basicConfig
, with some extra bells and whistles.
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!")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
env_logger-0.3.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for env_logger-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e73898ae04048bacdc20845480624b66c2dbf7324db12976adca7b76ecfe41 |
|
MD5 | 3ed917935289a601dd3a8b627b217406 |
|
BLAKE2b-256 | 7543b301c6bc2860e18e3b4222cbc3983a7afe000241ae4fc812dd5d8904b37d |