The easy way to configure logging
Project description
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
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
Built Distribution
File details
Details for the file env_logger-0.4.1.tar.gz
.
File metadata
- Download URL: env_logger-0.4.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8713382e2a4a0fdd820fe2d3297933d836c88338356f70440b40a9b34ddd834 |
|
MD5 | e5017b932e0e69dbe96752c00a2fe1e4 |
|
BLAKE2b-256 | 158e47cf2df1dd25c80bdc4b7bc6de28dc4499721e3ff8a81d87e7290b5ec0a9 |
File details
Details for the file env_logger-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: env_logger-0.4.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06669202cfb558b639e81ea5069d2dbc4d54dbc87d8447bdbb48e3d4e5a8ba91 |
|
MD5 | 594b1be9c663c0455334db7807508f35 |
|
BLAKE2b-256 | b3f553afa0e5f3b960d8ac936a4a075664c0c343299298736cd6d7536fad4a6c |