Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow logging configuration to be customized #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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