Skip to content

Commit e40662f

Browse files
authored
Revert "fix: prevent logging config clobbering" (#10177)
Revert "fix: prevent logging config clobbering (#10133)" This reverts commit 166b9f2.
1 parent 9057510 commit e40662f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

utils/general.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,8 @@ def set_logging(name=None, verbose=VERBOSE):
126126
log.addHandler(handler)
127127

128128

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

0 commit comments

Comments
 (0)