From af7674f197d56e615b2fa7ecfed8f1e1faa82826 Mon Sep 17 00:00:00 2001 From: mcarans Date: Mon, 4 Mar 2024 11:35:34 +1300 Subject: [PATCH] Add logging to WFP as it can be long running --- src/hdx/location/wfp_exchangerates.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hdx/location/wfp_exchangerates.py b/src/hdx/location/wfp_exchangerates.py index 952f539..998aef7 100644 --- a/src/hdx/location/wfp_exchangerates.py +++ b/src/hdx/location/wfp_exchangerates.py @@ -1,3 +1,4 @@ +import logging from datetime import timezone from typing import Dict, List @@ -11,6 +12,8 @@ except ImportError: WfpApiToken = None +logger = logging.getLogger(__name__) + class WFPExchangeRates: """Obtain WFP official exchange rates. Requires WFP credentials amd @@ -91,6 +94,7 @@ def get_historic_rates( """ historic_rates = {} for currency in currencies: + logger.info(f"Getting WFP historic rates for {currency}") currency_historic_rates = self.get_currency_historic_rates( currency )