Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update get_loggers() #4854

Merged
merged 14 commits into from
Nov 1, 2021
Merged

Update get_loggers() #4854

merged 14 commits into from
Nov 1, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 18, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR refactors logging in the YOLOv5 project to use a consistent logging pattern.

πŸ“Š Key Changes

  • πŸ”„ Replaced direct print() statements with LOGGER calls for structured logging.
  • 🧹 Removed explicit LOGGER definitions in individual files, referencing a common LOGGER instead.
  • βœ‚οΈ Removed set_logging() calls, assuming logging is set centrally.
  • 🚚 Moved the set_logging() function and LOGGER initialization into utils/general.py for shared use.

🎯 Purpose & Impact

  • Unified Logging: Centralizes logging configuration, making it easier to manage and configure output across different files.
  • Cleaner Codebase: Simplifies modules by removing duplicate logging setup, leading to a cleaner and more maintainable code structure.
  • Enhanced Debugging: Structured logging provides consistency in debug output, which can be helpful when diagnosing issues.
  • Non-functional Change: As a refactoring, this should not affect the end-user functionality of the tool, but developers will experience a more standardized logging approach.

@glenn-jocher glenn-jocher self-assigned this Sep 18, 2021
@glenn-jocher glenn-jocher force-pushed the update/logging branch 2 times, most recently from 42b92f0 to b191ace Compare September 18, 2021 14:42
@glenn-jocher glenn-jocher changed the title Transition print() to LOGGER.info() Update get_loggers() Sep 18, 2021
@glenn-jocher glenn-jocher merged commit 7b1f7ae into master Nov 1, 2021
@glenn-jocher glenn-jocher deleted the update/logging branch November 1, 2021 17:22
@glenn-jocher glenn-jocher removed the TODO label Nov 1, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update `set_logging()`

* Update export.py

* pre-commit fixes

* Update LoadImages

* Update LoadStreams

* Update print_args

* Single LOGGER definition

* yolo.py fix

Co-authored-by: pre-commit <pre-commit@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant