Fix: use project logger to prevent duplicate logs in images utility#1202
Fix: use project logger to prevent duplicate logs in images utility#1202Samanvitha275 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
WalkthroughA redundant logger initialization was removed from the images utility module. The duplicate Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Hi maintainers, this fixes duplicate logging caused by multiple handlers in images.py. |
Problem:
The images utility initialized its own logger instead of using the project's centralized logging configuration.
This resulted in duplicate log outputs when the module was imported multiple times.
Root Cause:
logging.getLogger(__name__)was used alongside the project'sget_logger, causing multiple handlers to attach to the same module logger.Solution:
Removed the redundant logger initialization and used the project's logging setup consistently.
Impact:
Verification:
Ran the module after modification — logs now appear only once and all features work as before.
Fixes #815