Merge pull request #1378 from yuvipanda/dual-log

Use self.log rather than logging module directly
pull/1380/head
Simon Li 2024-11-27 10:08:00 +00:00 zatwierdzone przez GitHub
commit 8a6eb6b19e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -58,7 +58,7 @@ class DoiProvider(ContentProvider):
# Reraise any other errors because if the DOI service is down (or
# we hit a rate limit) we don't want to silently continue to the
# default Git provider as this leads to a misleading error.
logging.error(f"DOI {doi} does not resolve: {e}")
self.log.error(f"DOI {doi} does not resolve: {e}")
raise
return resp.url
else:
@ -70,7 +70,7 @@ class DoiProvider(ContentProvider):
# file related to a record
file_url = deep_get(file_ref, host["download"])
fname = deep_get(file_ref, host["filename"])
logging.debug(f"Downloading file {file_url} as {fname}\n")
self.log.debug(f"Downloading file {file_url} as {fname}\n")
yield f"Requesting {file_url}\n"
resp = self._request(file_url, stream=True)