Expand logging capabilities of Tethering subsystem

Introduce a SharedLog that can be shared among all Tethering
components.  All log entries go to the same log, and each includes
its subsystem name.  Additionally, all entries emitted to the
system log shared the same tag, so can easily be watched.

More subsystems can inherit a SharedLog, but to minimize cherry-pick
conflicts we limit ourselves to these changes only.

Test: as follows
    - built
    - flashed
    - booted
    - log output observed via dumpsys
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36988090
Bug: 38218697
Change-Id: I1229d4c55987402d84b0d4a2c8a595e0c829aa3e
This commit is contained in:
Erik Kline
2017-05-12 16:52:48 +09:00
parent 043ad49e0f
commit d364a24856

View File

@@ -183,6 +183,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
implements PendingIntent.OnFinished {
private static final String TAG = ConnectivityService.class.getSimpleName();
public static final String DIAG_ARG = "--diag";
public static final String SHORT_ARG = "--short";
private static final boolean DBG = true;
private static final boolean VDBG = false;
@@ -1961,7 +1964,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
return;
}
if (argsContain(args, "--diag")) {
if (argsContain(args, DIAG_ARG)) {
dumpNetworkDiagnostics(pw);
return;
}
@@ -2053,7 +2056,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
pw.println();
dumpAvoidBadWifiSettings(pw);
if (argsContain(args, "--short") == false) {
if (argsContain(args, SHORT_ARG) == false) {
pw.println();
synchronized (mValidationLogs) {
pw.println("mValidationLogs (most recent first):");