Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the logging configuration within the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly refactors the library's logging to align with Python best practices. By removing the dictConfig call and adding a NullHandler, the library no longer interferes with the host application's logging configuration. The namespacing of loggers under the cog hierarchy is also a great improvement for clarity. I've added a few minor suggestions to use the __name__ variable for getting loggers, which is a common and maintainable pattern.
Remove dictConfig() call from Graph.__init__ that was replacing the host application's entire logging setup. Follow Python best practice for library logging: add NullHandler to top-level 'cog' logger and let the application control its own configuration. - Remove logging_config dict from config.py - Remove dictConfig call and import from torque.py - Add NullHandler in cog/__init__.py - Namespace all loggers under 'cog.' (e.g. cog.torque, cog.database) - Clean up dictConfig references in test files
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #81 +/- ##
==========================================
- Coverage 87.13% 87.12% -0.02%
==========================================
Files 12 12
Lines 2378 2376 -2
==========================================
- Hits 2072 2070 -2
Misses 306 306 ☔ View full report in Codecov by Sentry. |
Remove dictConfig() call from Graph.init that was replacing the host application's entire logging setup. Follow Python best practice for library logging: add NullHandler to top-level 'cog' logger and let the application control its own configuration.
fixes #80