Skip to content

Conversation

@taylorbarstow
Copy link

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

  • Run a singer tap or target, and confirm that it logs as usual
  • Copy logging.conf to a separate file and change the log format to something noticeably different
  • Set the SINGER_LOGGING_CONF environment variable to contain the absolute path of your new logging.conf
  • Run the singer tap or target again, and confirm that it logs with your customized log format

Risks

  • None

Rollback steps

  • revert this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants