From 0525a14edaebcb3e9f3baec148b6dd7c322a920d Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 24 May 2020 13:59:09 +0200 Subject: [PATCH] Reduced logging --- .../main/java/eu/faircode/netguard/ServiceSinkhole.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java b/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java index 82c907bf..ca06d7f0 100644 --- a/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java +++ b/app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java @@ -1651,9 +1651,6 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS if (version == 6 && !(iname instanceof Inet6Address)) continue; - if (dname != null) - Log.i(TAG, "Set filter " + key + " " + daddr + "/" + dresource + "=" + block); - boolean exists = mapUidIPFilters.get(key).containsKey(iname); if (!exists || !mapUidIPFilters.get(key).get(iname).isBlocked()) { IPRule rule = new IPRule(key, name + "/" + iname, block, time + ttl); @@ -1662,8 +1659,11 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS Log.w(TAG, "Address conflict " + key + " " + daddr + "/" + dresource); } else if (exists) { mapUidIPFilters.get(key).get(iname).updateExpires(time + ttl); - if (dname != null) + if (dname != null && ttl > 60 * 1000L) Log.w(TAG, "Address updated " + key + " " + daddr + "/" + dresource); + } else { + if (dname != null) + Log.i(TAG, "Ignored " + key + " " + daddr + "/" + dresource + "=" + block); } } else Log.w(TAG, "Address not numeric " + name);