singer-io / singer-python

Writes the Singer format from Python
https://singer.io
Apache License 2.0
538 stars 128 forks source link

Allow logging configuration to be customized #144

Open taylorbarstow opened 3 years ago

taylorbarstow commented 3 years ago

Description of change

Allow logging behavior to be configured at runtime, by supporting a SINGER_LOGGING_CONF environment variable. This enables downstream developers to provide their own version of logging.conf to match the needs of their projects.

Without this change, logging configuration is hard coded in logging.conf, which is loaded within logger.getLogger(). This makes it very difficult to change logging settings at runtime. Even taps and targets that attempt to support customization fail to do so properly since multiple invocations of logger.getLogger() will simply reload the hard coded settings (target-postgres is an example).

Manual QA steps

Risks

Rollback steps