-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Search before asking
- I have searched the YOLOv5 issues and found no similar bug report.
YOLOv5 Component
Other
Bug
I'm wondering if there is a good reason why set_logging deletes root logging handlers (see
Lines 49 to 50 in b4a29b5
| for h in logging.root.handlers: | |
| logging.root.removeHandler(h) # remove all handlers associated with the root logger object |
I add handlers to the root logger so that I can log all 3rd party modules to a log file, and yolov5 doing this is deleting these handlers and making it not possible for me to load yolov5 and log its output to a file with the rest of my program's output (without resorting to some ugly runtime hacks).
Maybe there is something I am missing? Is it possible to make this behavior optional? Happy to submit a PR.
Environment
Newest Yolov5 master on Ubuntu 20 LTS.
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working