From afe182ec9e4bf646ca292f6cb5af82f3aca960de Mon Sep 17 00:00:00 2001 From: Fredrik Svenson Date: Thu, 18 Feb 2021 16:12:42 +0100 Subject: [PATCH] Do not use root logger for URL requests --- maxarcat/catalog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maxarcat/catalog.py b/maxarcat/catalog.py index 6c00265..ca4e25d 100644 --- a/maxarcat/catalog.py +++ b/maxarcat/catalog.py @@ -309,7 +309,7 @@ def get_url(self, url: str) -> bytes: :param url: Any catalog URL that supports GET. :return: Response body as bytes """ - logging.info(f'GET {url}') + Catalog.logger.info(f'GET {url}') return self._request_url(requests.get, url) def get_url_json(self, url: str): @@ -319,7 +319,7 @@ def get_url_json(self, url: str): :param url: URL from an item's asset's href property :return: Parsed JSON, generally returning a dict """ - logging.info(f'GET {url}') + Catalog.logger.info(f'GET {url}') response = self._request_url(requests.get, url) try: return json.loads(str(response, encoding='utf-8'))