Fix InternalLogger logging hierarchy and bump to v1.1.1 #18
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
This PR fixes the
InternalLoggerclass to properly register with Python's logging hierarchy, enabling handler propagation fromlogging.basicConfig()and parent loggers.Problem
InternalLoggerinstances were not being registered with Python's logging manager, causing:logging.basicConfig()or parent loggersChanges
1. Logger Hierarchy Registration (
_internal_logging.py)InternalLoggerwithlogging.Logger.manager.loggerDictduring__init___fixupParents)2. Fix
prefab_internalAttributelog()to_log()methodinfo(),debug(), etc. methods call_log()directly, notlog()prefab_internal=Trueinto all log recordsextraparameter as a dictionary3. Version Bump
Testing
✅ All 364 tests pass
✅ Pre-commit hooks pass (black, ruff, prettier, mypy)
✅ Manual testing confirms logger hierarchy works correctly
✅ Logger inherits handlers from root and parent loggers
✅
prefab_internalattribute is properly set on all log recordsPorted From
This fix was originally implemented in the prefab-cloud-python repository:
prefab-cloud/prefab-cloud-python#127
🤖 Generated with Claude Code