Skip to content

Commit

Permalink
Reduced logging
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed May 24, 2020
1 parent 8bb7fe2 commit 0525a14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/eu/faircode/netguard/ServiceSinkhole.java
Original file line number Diff line number Diff line change
Expand Up @@ -1651,9 +1651,6 @@ private void prepareUidIPFilters(String dname) {
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);
Expand All @@ -1662,8 +1659,11 @@ private void prepareUidIPFilters(String dname) {
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);
Expand Down

0 comments on commit 0525a14

Please sign in to comment.