summaryrefslogtreecommitdiffstats
path: root/server/TetherController.cpp
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2018-06-06 20:50:11 +0900
committerErik Kline <ek@google.com>2018-07-10 16:05:04 +0900
commitb31fd69b1683915e73006fcc5f45b15c7ed5b941 (patch)
tree4bdbdf01596650d152ceef9c1f7a9b4ed745c859 /server/TetherController.cpp
parent4e19cb8648df44b1642fbe13890e1f76fc938588 (diff)
downloadplatform_system_netd-b31fd69b1683915e73006fcc5f45b15c7ed5b941.tar.gz
platform_system_netd-b31fd69b1683915e73006fcc5f45b15c7ed5b941.tar.bz2
platform_system_netd-b31fd69b1683915e73006fcc5f45b15c7ed5b941.zip
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
Diffstat (limited to 'server/TetherController.cpp')
-rw-r--r--server/TetherController.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
index d13409953..dbda38a5d 100644
--- a/server/TetherController.cpp
+++ b/server/TetherController.cpp
@@ -40,6 +40,7 @@
#include <log/log.h>
#include <netdutils/StatusOr.h>
+#include "Controllers.h"
#include "Fwmark.h"
#include "NetdConstants.h"
#include "Permission.h"
@@ -49,10 +50,10 @@
#include "TetherController.h"
using android::base::Join;
-using android::base::StringPrintf;
using android::base::StringAppendF;
-using android::netdutils::StatusOr;
+using android::base::StringPrintf;
using android::netdutils::statusFromErrno;
+using android::netdutils::StatusOr;
namespace {
@@ -126,10 +127,10 @@ const std::string GET_TETHER_STATS_COMMAND = StringPrintf(
int TetherController::DnsmasqState::sendCmd(int daemonFd, const std::string& cmd) {
if (cmd.empty()) return 0;
- ALOGD("Sending update msg to dnsmasq [%s]", cmd.c_str());
+ gLog.log("Sending update msg to dnsmasq [%s]", cmd.c_str());
// Send the trailing \0 as well.
if (write(daemonFd, cmd.c_str(), cmd.size() + 1) < 0) {
- ALOGE("Failed to send update command to dnsmasq (%s)", strerror(errno));
+ gLog.error("Failed to send update command to dnsmasq (%s)", strerror(errno));
errno = EREMOTEIO;
return -1;
}