fix: Use __name__ as logger name

This commit is contained in:
teleprint-me 2024-05-19 22:39:30 -04:00
parent a0362ea475
commit 9a2834e24e
No known key found for this signature in database
GPG key ID: B0D11345E65C4D48

View file

@ -65,7 +65,7 @@ class HFHubRequest:
# Set the logger
if logger is None:
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("huggingface-hub")
logger = logging.getLogger(__name__)
self.logger = logger
# Persist across requests
@ -122,7 +122,7 @@ class HFHubBase:
# Set the logger
if logger is None:
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("hf-tok-req")
logger = logging.getLogger(__name__)
self.logger = logger
self._hub = HFHubRequest(auth_token, logger)