Skip to main content

Consistent logging for EIQ projects.

Project description


This package exists to make it easy to configure logging in a consistent way across multiple EclecticIQ Python projects.


pip install eiq-logging


In your application's entrypoint, whatever that may be:

import eiq_logging

The configure function takes a few arguments:

  • stream determines where logs are written. Defaults to sys.stderr.
  • log_format can be either "plain" or "json". "plain" means plain text and is meant to be read by humans. "json" is newline-delimited JSON, meant for log aggregation and machine parsing.
  • log_levels can be either a dict of {logger_name: log_level} or a string which will be parsed as such. The string is comma-separated, and each item in the string should be in the format of "logger_name:log_level" - for example, root:info,example:debug will set the root logger to the level INFO, and the logger "example" to level DEBUG.

If you leave out the log_format and log_level arguments, you can configure these through the environment variables EIQ_LOG_FORMAT and EIQ_LOG_LEVEL.

If you're using Gunicorn, you don't need to call configure yourself, you can just start the process with the --config flag:

gunicorn --config=python:eiq_logging.gunicorn myapp

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for eiq-logging, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size eiq-logging-1.4.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page