Add basic logging infrastructure for bugreports
Test: as follows
- built, flashed, booted
- "adb shell dumpsys netd" shows logs
- tests/runtests.sh passes
Change-Id: I0e44da7f9a9cc53074ffc396b958e9e2dbcd2603
diff --git a/server/Controllers.h b/server/Controllers.h
index 38ffade..ac17ef2 100644
--- a/server/Controllers.h
+++ b/server/Controllers.h
@@ -30,17 +30,18 @@
#include "PppController.h"
#include "ResolverController.h"
#include "StrictController.h"
+#include "TcpSocketMonitor.h"
#include "TetherController.h"
#include "TrafficController.h"
#include "WakeupController.h"
#include "XfrmController.h"
-#include "TcpSocketMonitor.h"
+#include "netdutils/Log.h"
namespace android {
namespace net {
class Controllers {
-public:
+ public:
Controllers();
NetworkController netCtrl;
@@ -61,7 +62,7 @@
void init();
-private:
+ private:
friend class ControllersTest;
void initIptablesRules();
static void initChildChains();
@@ -74,6 +75,7 @@
static int (*execIptablesRestoreWithOutput)(IptablesTarget, const std::string&, std::string *);
};
+extern netdutils::Log gLog;
extern Controllers* gCtls;
} // namespace net