Skip to main content

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
    1. installing pyenv following these instructions, and
    2. 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

env_logger-0.4.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

env_logger-0.4.1-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page