mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Replace root logger calls with module-specific loggers
This commit is contained in:
@@ -10,6 +10,8 @@ from providers.callsigndata.file_download_callsign_data_provider import (
|
||||
FileDownloadCallsignDataProvider,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ClublogXML(FileDownloadCallsignDataProvider):
|
||||
"""Callsign data provider for ClubLog's Country File, which provides basic callsign to DXCC entity mapping."""
|
||||
@@ -25,7 +27,7 @@ class ClublogXML(FileDownloadCallsignDataProvider):
|
||||
self._api_key = provider_config.get("api_key", "")
|
||||
if self._api_key == "":
|
||||
provider_config["enabled"] = False
|
||||
logging.warning(
|
||||
logger.warning(
|
||||
"Clublog XML callsign data provider configured but no api key was provided, this has been disabled."
|
||||
)
|
||||
|
||||
@@ -55,7 +57,7 @@ class ClublogXML(FileDownloadCallsignDataProvider):
|
||||
return True
|
||||
|
||||
except Exception:
|
||||
logging.exception("Exception when loading Clublog XML.")
|
||||
logger.exception("Exception when loading Clublog XML.")
|
||||
return False
|
||||
|
||||
def _perform_new_lookup(self, callsign, lookup_credentials):
|
||||
@@ -71,6 +73,6 @@ class ClublogXML(FileDownloadCallsignDataProvider):
|
||||
|
||||
except Exception:
|
||||
self.status = "Error"
|
||||
logging.exception("Exception when looking up data from Clublog XML data")
|
||||
logger.exception("Exception when looking up data from Clublog XML data")
|
||||
|
||||
return callsign_data
|
||||
|
||||
Reference in New Issue
Block a user