summaryrefslogtreecommitdiff
path: root/adb_client.cpp
diff options
context:
space:
mode:
authorSpencer Low <CompareAndSwap@gmail.com>2015-07-21 02:06:26 -0700
committerSpencer Low <CompareAndSwap@gmail.com>2015-07-21 02:06:26 -0700
commitc3881d176113a7fd2fc16f93958d09d4da3b9507 (patch)
tree62e95a1ffffde3814c2818c52b2d9404856b57ae /adb_client.cpp
parent7790e683e53de1fa5fa84a8235354edb01d43751 (diff)
downloadadb-c3881d176113a7fd2fc16f93958d09d4da3b9507.tar.gz
adb: logging: newlines, thread ids, error code overwriting
Add missing \n to uses of legacy D() macro. This should make the legacy logging easier to read (and harder to miss important stuff). On POSIX, use gettid() from libcutils instead of pthread_self() so that the output shows a more reasonable number instead of a pointer value. This should be ok since libbase's logging already uses gettid(). Win32: Don't let the Win32 last error get overwritten by API calls after the original error'ing API. When encountering an unknown error, log the specific error code. Change-Id: Ib8f72754efa7ba895d2f1cd914251fec2a1d894c Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
Diffstat (limited to 'adb_client.cpp')
-rw-r--r--adb_client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb_client.cpp b/adb_client.cpp
index ef9a586..e42d928 100644
--- a/adb_client.cpp
+++ b/adb_client.cpp
@@ -243,7 +243,7 @@ int adb_connect(const std::string& service, std::string* error) {
fd = _adb_connect(service, error);
if (fd == -1) {
- D("_adb_connect error: %s", error->c_str());
+ D("_adb_connect error: %s\n", error->c_str());
} else if(fd == -2) {
fprintf(stderr,"** daemon still not running\n");
}