#10013 fix: Check if the stdlib (and not structlog) logger is enabled for DEBUG to log Singer stdout
Pull request opened by
edgarrmondragon
Description
This also makes tests that rely on debug logs being enabled more robust.
Checklist
• I have read the
contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Related Issues
• Closes #XXXX
Summary by Sourcery
Ensure Singer stdout debug logging is gated by the standard-library logger and align tests and CI logging configuration accordingly.
Bug Fixes:
• Use the standard-library logger enablement to decide whether to attach Singer stdout debug logging handlers instead of relying on the structlog logger state.
Enhancements:
• Introduce a helper on plugin invokers to obtain either structlog- or stdlib-based loggers for plugin stdout and stderr.
• Adjust tests that depend on debug logging to toggle the appropriate plugin stdout logger level, making them more robust against pytest log capturing behavior.
CI:
• Remove pytest log file generation and associated GitHub Actions artifact upload for test logs to simplify CI logging output.
Tests:
• Update extract/load block tests to configure the intermediate plugin stdout logger at DEBUG level rather than the root logger, preventing interference from pytest's logging capture configuration.
meltano/meltano