adb: don't spew to logcat when tracing is enabled.
When persist.adb.trace_mask is used to enable verbose logging, avoid
exponential logging when a user runs `adb logcat`. As a side-effect,
set the minimum logging level to include everything when ADB_TRACE is
used on the client (which is something we want anyway).
Bug: http://b/72971016
Test: `adb shell 'setprop persist.adb.trace_mask; killall adbd'; adb logcat`
Change-Id: Id4bca1f3933a920345499dbeaeb103c8a2e220cd
diff --git a/adb/adb_trace.h b/adb/adb_trace.h
index fc6560c..1d2c8c7 100644
--- a/adb/adb_trace.h
+++ b/adb/adb_trace.h
@@ -43,11 +43,11 @@
#define VLOG_IS_ON(TAG) \
((adb_trace_mask & (1 << (TAG))) != 0)
-#define VLOG(TAG) \
+#define VLOG(TAG) \
if (LIKELY(!VLOG_IS_ON(TAG))) \
- ; \
- else \
- LOG(INFO)
+ ; \
+ else \
+ LOG(DEBUG)
// You must define TRACE_TAG before using this macro.
#define D(...) \