Skip to content

Commit

Permalink
Revert "fix: prevent logging config clobbering" (#10177)
Browse files Browse the repository at this point in the history
Revert "fix: prevent logging config clobbering (#10133)"

This reverts commit 166b9f2.
  • Loading branch information
glenn-jocher committed Nov 16, 2022
1 parent 9057510 commit e40662f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ def set_logging(name=None, verbose=VERBOSE):
log.addHandler(handler)


logger_name = "yolov5"
set_logging(logger_name) # run before defining LOGGER
LOGGER = logging.getLogger(logger_name) # define globally (used in train.py, val.py, detect.py, etc.)
set_logging() # run before defining LOGGER
LOGGER = logging.getLogger("yolov5") # define globally (used in train.py, val.py, detect.py, etc.)
if platform.system() == 'Windows':
for fn in LOGGER.info, LOGGER.warning:
setattr(LOGGER, fn.__name__, lambda x: fn(emojis(x))) # emoji safe logging
Expand Down

0 comments on commit e40662f

Please sign in to comment.