From 25b7f60aa7bfeaaf0637a0e9264b2209fed8c000 Mon Sep 17 00:00:00 2001 From: Monobikash Das <43202165+MonobikashDas@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:03:29 +0530 Subject: [PATCH] added logger for location api Signed-off-by: Monobikash Das <43202165+MonobikashDas@users.noreply.github.com> --- .../main/java/io/mosip/opencrvs/util/OpencrvsDataUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mediator/src/main/java/io/mosip/opencrvs/util/OpencrvsDataUtil.java b/mediator/src/main/java/io/mosip/opencrvs/util/OpencrvsDataUtil.java index bd49b8f..65f0706 100644 --- a/mediator/src/main/java/io/mosip/opencrvs/util/OpencrvsDataUtil.java +++ b/mediator/src/main/java/io/mosip/opencrvs/util/OpencrvsDataUtil.java @@ -284,8 +284,10 @@ public String getAddressLocationFromAddress(Map address, String public String fetchAddressValueFromId(String id){ try{ + String url = locationsUrl + "/" + id; + LOGGER.info("Calling location url endpoint - " + url); JSONObject json = new JSONObject( - new RestTemplate().getForObject(locationsUrl + "/" + id, String.class)); + new RestTemplate().getForObject(url, String.class)); return json.getString("name"); } catch(Exception e){ throw ErrorCode.ADDRESS_FETCHING_EXCEPTION.throwUnchecked(e);