You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix InternalLogger logging hierarchy and bump to v1.1.1 (#18)
* Fix InternalLogger to properly register with logging hierarchy
InternalLogger instances were not being registered with Python's logging
manager, causing them to have no parent logger and preventing handler
propagation. This meant that:
- basicConfig() had no effect on InternalLogger instances
- They couldn't inherit handlers from parent loggers
- Users couldn't see SDK internal logs without manual configuration
This commit fixes the issue by:
1. Registering InternalLogger instances with logging.Logger.manager.loggerDict
during __init__, ensuring they participate in the logging hierarchy
2. Setting up parent loggers properly (adapted from Python's logging
internals) so handlers propagate correctly
3. Fixing the prefab_internal extra attribute by overriding _log() instead
of log(), since info(), debug(), etc. call _log() directly
The fix is compatible with both:
- Standard logging (logging.basicConfig, manual handler configuration)
- Structlog (when configured to use stdlib logging)
The prefab_internal=True extra attribute is still added to all log records
from InternalLogger instances, allowing users to filter/identify SDK
internal messages.
Ported from: prefab-cloud/prefab-cloud-python#127
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Bump version to 1.1.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Changelog
2
2
3
+
## [1.1.1] - 2025-11-20
4
+
5
+
- Fix InternalLogger to properly register with Python's logging hierarchy, enabling handler propagation from `logging.basicConfig()` and parent loggers [#18]
6
+
3
7
## [0.12.0] - 2025-04-14
4
8
5
9
- Add special case handling for context `prefab.current-time` to return the current time (UTC) to round out new operator support [#124]
0 commit comments