diff options
author | Spencer Low <CompareAndSwap@gmail.com> | 2015-07-21 02:06:26 -0700 |
---|---|---|
committer | Spencer Low <CompareAndSwap@gmail.com> | 2015-07-21 02:06:26 -0700 |
commit | c3881d176113a7fd2fc16f93958d09d4da3b9507 (patch) | |
tree | 62e95a1ffffde3814c2818c52b2d9404856b57ae /adb_client.cpp | |
parent | 7790e683e53de1fa5fa84a8235354edb01d43751 (diff) | |
download | adb-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.cpp | 2 |
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"); } |