Add logging to NetworkStackClient

The current logging relies on the system log that may rotate. This is a
problem to investigate bugs where the network stack service is not
started. Add a SharedLog to NetworkStackClient and dump it in
ConnectivityService (for lack of a better place to dump it).

Bug: 124307802
Test: Booted, dumpsys connectivity shows the log
Change-Id: If596451d0613645f68a8a32acb032eea76ea506c
This commit is contained in:
Remi NGUYEN VAN
2019-02-18 11:20:28 +09:00
parent c7702baa80
commit 31c44d7bc4

View File

@@ -2373,6 +2373,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
pw.decreaseIndent();
}
pw.println();
pw.println("NetworkStackClient logs:");
pw.increaseIndent();
NetworkStackClient.getInstance().dump(pw);
}
private void dumpNetworks(IndentingPrintWriter pw) {