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.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for env_logger-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8893309a1cee470e34510de6c81ac99e0cea159159b028aabf3824a04b62e2e6 |
|
MD5 | 9a586419db9d911ed1139db14a0ed542 |
|
BLAKE2b-256 | 1b82db4f418b6c92ed5b7a09830ff88674d286675587376134af6d0bd366d086 |