@@ -20,6 +20,7 @@

import java.io.PrintWriter;

import java.io.StringWriter;

+import java.net.UnknownHostException;

/**

* API for sending log output.

@@ -302,6 +303,17 @@

if (tr == null) {

return "";

}

+

+ // This is to reduce the amount of log spew that apps do in the non-error

+ // condition of the network being unavailable.

+ Throwable t = tr;

+ while (t != null) {

+ if (t instanceof UnknownHostException) {

+ return "";

+ }

+ t = t.getCause();

+ }

+

StringWriter sw = new StringWriter();

PrintWriter pw = new PrintWriter(sw);

tr.printStackTrace(pw);