From fb1d25cb706c726768831bf23c6d49f83a7ca722 Mon Sep 17 00:00:00 2001 From: aashikam Date: Fri, 20 Dec 2024 13:20:34 +0530 Subject: [PATCH] Remove unnecessary logs --- .../facebook/ads/connector/FacebookDataProcessor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/facebook/ads/connector/FacebookDataProcessor.java b/src/main/java/org/wso2/carbon/facebook/ads/connector/FacebookDataProcessor.java index 599ab84..d0c5d82 100644 --- a/src/main/java/org/wso2/carbon/facebook/ads/connector/FacebookDataProcessor.java +++ b/src/main/java/org/wso2/carbon/facebook/ads/connector/FacebookDataProcessor.java @@ -128,6 +128,7 @@ class FacebookDataProcessor { static JSONObject processData(JSONArray inputArray) { Map fieldCounts = new HashMap<>(); + Set unsupportedFields = new HashSet<>(); // Determine maximum occurrences of each field for (int i = 0; i < inputArray.length(); i++) { @@ -145,7 +146,10 @@ static JSONObject processData(JSONArray inputArray) { int keyCount = countOccurrences(entry, key); fieldCounts.put(mappedKey, Math.max(currentMax, keyCount)); } else { - log.warn("Ignoring unsupported PII type: " + key); + if (!unsupportedFields.contains(key)) { + log.info("Ignoring unsupported PII type: " + key); + unsupportedFields.add(key); + } } } }