perf: skip disabled log call-site resolution - #415
Open
goldyfruit wants to merge 3 commits into
Open
Conversation
Contributor
📝 WalkthroughWalkthroughThe logging utility now propagates levels to cached loggers, checks numeric and named levels, skips suppressed debug calls before stack inspection, and removes a fallback configuration import. Unit tests cover these behaviors. ChangesLogging behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
goldyfruit
marked this pull request as ready for review
August 8, 2026 01:33
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ovos_utils/log.py`:
- Around line 138-152: Update LOG.is_enabled_for to honor
logging.root.manager.disable before evaluating the configured level, and when
LOG.level is logging.NOTSET, use the effective root logger level rather than
treating NOTSET as an enabled threshold. Add regression tests covering disabled
logging and NOTSET with DEBUG suppression, while preserving the existing
unknown-level behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 37f3f695-c5d1-47fe-a264-eee7ded306c0
📒 Files selected for processing (2)
ovos_utils/log.pytest/unittests/test_log.py
JarbasAl
reviewed
Aug 9, 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
LOG.is_enabled_forfor named and numeric stdlib log levelslogging.disableand resolveNOTSETthrough the effective root levelWhy this layer
LOG._get_real_loggerusesinspect.stack()for every call. Gating in ovos-utils removes that shared cost for every disabled severity instead of adding private checks to each caller. This does not change skill order, transformer behavior, message routing, or metrics ownership.Validation
git diff --checkOpenVoiceOS/ovos-plugin-manager#427 is the coordinated high-volume consumer. No CI files were changed.