fix(logging): replace bare logging.getLogger with project get_logger … - #1516
fix(logging): replace bare logging.getLogger with project get_logger …#1516Aditya30ag wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughThe change replaces direct standard-library logger initialization with ChangesApplication logger standardization
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change standardizes logging in three backend modules so their messages use the project’s formatting and filtering without changing application logic or request behavior. No actionable merge-blocking risk remains after normal checks and review. Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 |
Link your account with GitcordThanks for opening this PR, @Aditya30ag! To receive Discord notifications and contributor tracking for this organization:
Once linked, Gitcord can notify you about reviews, merges, and more. — Posted by Gitcord |
Summary
Three backend modules used Python's stdlib
logging.getLoggerdirectly instead of the project'sget_loggerfromapp.logging.setup_logging, causing their log output to bypass colour formatting,[COMPONENT]prefixes, and environment-level filtering.backend/app/utils/images.pywas the most severe caseget_loggerwas assigned correctly on line 35, then silently overwritten two lines later:backend/app/routes/face_clusters.pyandbackend/app/routes/models.pysimply never adopted the pattern used by all 7 of their sibling route files.Fixed by removing the duplicate assignment and redundant
import logginginimages.py, and replacinglogging.getLoggerwithget_logger(plus the matching import) inface_clusters.pyandmodels.py.get_loggeris a thin wrapper aroundlogging.getLoggerlog propagation and levels are completely unchanged.Addressed Issues:
Fixes #1515
Additional Notes:
No logic change across any of the three files. Only affects log output formatting and consistency.
AI Usage Disclosure:
Checklist
Summary by CodeRabbit