diff options
author | Florian Schmaus <flo@geekplace.eu> | 2014-06-08 13:18:46 +0200 |
---|---|---|
committer | Florian Schmaus <flo@geekplace.eu> | 2014-06-08 13:27:25 +0200 |
commit | 3236432c39f1d5a1bbbe362c5cfdb088756fd04f (patch) | |
tree | 3e67a0bed7fdd2d7525eca395c7f0dfd44bc64f5 /src | |
parent | 152be6eb1a22da8cebe24ac4ee05b487936c9f2a (diff) |
Make minidns Android agnostic
there is really no need for minidns to be Android exclusive. Replacing
the Android log API with JUL make minidns available for Android and Java
SE.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/measite/minidns/Client.java (renamed from src/de/measite/minidns/Client.java) | 13 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/DNSMessage.java (renamed from src/de/measite/minidns/DNSMessage.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/Question.java (renamed from src/de/measite/minidns/Question.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/Record.java (renamed from src/de/measite/minidns/Record.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/A.java (renamed from src/de/measite/minidns/record/A.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/AAAA.java (renamed from src/de/measite/minidns/record/AAAA.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/CNAME.java (renamed from src/de/measite/minidns/record/CNAME.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/Data.java (renamed from src/de/measite/minidns/record/Data.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/NS.java (renamed from src/de/measite/minidns/record/NS.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/record/SRV.java (renamed from src/de/measite/minidns/record/SRV.java) | 0 | ||||
-rw-r--r-- | src/main/java/de/measite/minidns/util/NameUtil.java (renamed from src/de/measite/minidns/util/NameUtil.java) | 0 |
11 files changed, 6 insertions, 7 deletions
diff --git a/src/de/measite/minidns/Client.java b/src/main/java/de/measite/minidns/Client.java index 8bc75d01..fb42cd25 100644 --- a/src/de/measite/minidns/Client.java +++ b/src/main/java/de/measite/minidns/Client.java @@ -14,8 +14,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Random; +import java.util.logging.Logger; -import android.util.Log; import de.measite.minidns.Record.CLASS; import de.measite.minidns.Record.TYPE; @@ -25,6 +25,8 @@ import de.measite.minidns.Record.TYPE; */ public class Client { + private static final Logger LOGGER = Logger.getLogger(Client.class.getName()); + /** * The internal random class for sequence generation. */ @@ -177,22 +179,19 @@ public class Client { public String[] findDNS() { String[] result = findDNSByReflection(); if (result != null) { - Log.d("minidns/client", - "Got DNS servers via reflection: " + Arrays.toString(result)); + LOGGER.fine("Got DNS servers via reflection: " + Arrays.toString(result)); return result; } result = findDNSByExec(); if (result != null) { - Log.d("minidns/client", - "Got DNS servers via exec: " + Arrays.toString(result)); + LOGGER.fine("Got DNS servers via exec: " + Arrays.toString(result)); return result; } // fallback for ipv4 and ipv6 connectivity // see https://developers.google.com/speed/public-dns/docs/using - Log.d("minidns/client", - "No DNS found? Using fallback [8.8.8.8, [2001:4860:4860::8888]]"); + LOGGER.fine("No DNS found? Using fallback [8.8.8.8, [2001:4860:4860::8888]]"); return new String[]{"8.8.8.8", "[2001:4860:4860::8888]"}; } diff --git a/src/de/measite/minidns/DNSMessage.java b/src/main/java/de/measite/minidns/DNSMessage.java index 14c8f04b..14c8f04b 100644 --- a/src/de/measite/minidns/DNSMessage.java +++ b/src/main/java/de/measite/minidns/DNSMessage.java diff --git a/src/de/measite/minidns/Question.java b/src/main/java/de/measite/minidns/Question.java index 9d1e3f56..9d1e3f56 100644 --- a/src/de/measite/minidns/Question.java +++ b/src/main/java/de/measite/minidns/Question.java diff --git a/src/de/measite/minidns/Record.java b/src/main/java/de/measite/minidns/Record.java index fb0b5d5f..fb0b5d5f 100644 --- a/src/de/measite/minidns/Record.java +++ b/src/main/java/de/measite/minidns/Record.java diff --git a/src/de/measite/minidns/record/A.java b/src/main/java/de/measite/minidns/record/A.java index a85a7af0..a85a7af0 100644 --- a/src/de/measite/minidns/record/A.java +++ b/src/main/java/de/measite/minidns/record/A.java diff --git a/src/de/measite/minidns/record/AAAA.java b/src/main/java/de/measite/minidns/record/AAAA.java index d89147b2..d89147b2 100644 --- a/src/de/measite/minidns/record/AAAA.java +++ b/src/main/java/de/measite/minidns/record/AAAA.java diff --git a/src/de/measite/minidns/record/CNAME.java b/src/main/java/de/measite/minidns/record/CNAME.java index 4657b4a5..4657b4a5 100644 --- a/src/de/measite/minidns/record/CNAME.java +++ b/src/main/java/de/measite/minidns/record/CNAME.java diff --git a/src/de/measite/minidns/record/Data.java b/src/main/java/de/measite/minidns/record/Data.java index 9cb80374..9cb80374 100644 --- a/src/de/measite/minidns/record/Data.java +++ b/src/main/java/de/measite/minidns/record/Data.java diff --git a/src/de/measite/minidns/record/NS.java b/src/main/java/de/measite/minidns/record/NS.java index bf07e8c4..bf07e8c4 100644 --- a/src/de/measite/minidns/record/NS.java +++ b/src/main/java/de/measite/minidns/record/NS.java diff --git a/src/de/measite/minidns/record/SRV.java b/src/main/java/de/measite/minidns/record/SRV.java index 32b70c4d..32b70c4d 100644 --- a/src/de/measite/minidns/record/SRV.java +++ b/src/main/java/de/measite/minidns/record/SRV.java diff --git a/src/de/measite/minidns/util/NameUtil.java b/src/main/java/de/measite/minidns/util/NameUtil.java index 91a6649d..91a6649d 100644 --- a/src/de/measite/minidns/util/NameUtil.java +++ b/src/main/java/de/measite/minidns/util/NameUtil.java |