Adb: use VLOG() to replace D() for verbose logging.
As there are too many D(), we can keep both VLOG() and D() now, and get
rid of D() gradually.
Change-Id: I2f1cb70bcab3e82c99fed939341d03f6b2216076
diff --git a/adb/adb_io.cpp b/adb/adb_io.cpp
index 14e295f..7788996 100644
--- a/adb/adb_io.cpp
+++ b/adb/adb_io.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define TRACE_TAG TRACE_RWX
+#define TRACE_TAG RWX
#include "adb_io.h"
@@ -84,10 +84,8 @@
}
}
- D("readx: fd=%d wanted=%zu got=%zu", fd, len0, len0 - len);
- if (ADB_TRACING) {
- dump_hex(reinterpret_cast<const unsigned char*>(buf), len0);
- }
+ VLOG(RWX) << "readx: fd=" << fd << " wanted=" << len0 << " got=" << (len0 - len)
+ << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), len0);
return true;
}
@@ -96,10 +94,8 @@
const char* p = reinterpret_cast<const char*>(buf);
int r;
- D("writex: fd=%d len=%d: ", fd, (int)len);
- if (ADB_TRACING) {
- dump_hex(reinterpret_cast<const unsigned char*>(buf), len);
- }
+ VLOG(RWX) << "writex: fd=" << fd << " len=" << len
+ << " " << dump_hex(reinterpret_cast<const unsigned char*>(buf), len);
while (len > 0) {
r = adb_write(fd, p, len);