Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher committed Nov 4, 2023
1 parent c3cd909 commit 25bd3b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ultralytics/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ def filter(self, record):
LOGGER = logging.getLogger(LOGGING_NAME) # define globally (used in train.py, val.py, detect.py, etc.)
if WINDOWS: # emoji-safe logging
LOGGER.addFilter(EmojiFilter())
for logger in 'sentry_sdk', 'urllib3.connectionpool':
logging.getLogger(logger).setLevel(logging.CRITICAL)


class ThreadingLocked:
Expand Down Expand Up @@ -819,10 +821,6 @@ def before_send(event, hint):
ignore_errors=[KeyboardInterrupt, FileNotFoundError])
sentry_sdk.set_user({'id': SETTINGS['uuid']}) # SHA-256 anonymized UUID hash

# Disable all sentry logging
for logger in 'sentry_sdk', 'sentry_sdk.errors':
logging.getLogger(logger).setLevel(logging.CRITICAL)


class SettingsManager(dict):
"""
Expand Down

0 comments on commit 25bd3b9

Please sign in to comment.