refactor: logging configuration to require Settings instance#1031
Merged
refactor: logging configuration to require Settings instance#1031
Conversation
sylviamclaughlin
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
This pull request refactors the logging setup in the infrastructure layer to require explicit passing of a
Settingsinstance when configuring logging, removes the deprecated module-level logger, and updates tests and fixtures to support these changes. The main goals are to improve clarity, enforce best practices, and modernize the codebase by removing legacy patterns.Logging Setup Refactor:
configure_loggingfunction insetup.pynow requires asettingsparameter instead of implicitly fetching it, improving explicitness and testability. [1] [2]loggerfromsetup.pyand__init__.py, encouraging direct use ofstructlog.get_logger()in new code. [1] [2] [3]get_module_loggerfunction to usestructlog.get_logger()directly, removing reliance on the old module-level logger. [1] [2]Testing and Fixtures Updates:
mock_settingsfixtures toconftest.pyfiles for unit tests, allowing tests to pass a mockSettingsinstance toconfigure_logging. [1] [2]mock_settingsfixture and explicitly pass settings toconfigure_logging, ensuring compatibility with the updated API. [1] [2] [3] [4] [5] [6] [7]These changes modernize the logging setup and make the codebase easier to maintain and test.