Disable sensitive logs
- PII logs can only appear in VERBOSE level
- logSeverityStrToEnum() no more support VERBOSE level input, only
accept DEBUG, INFO, WARNING, and ERROR.
- developer can set DBG flag from code to have a debug build, the DEBUG
level is automatically promote to VERBOSE.
- uniform log format to [FILE NAME]: [FUNC NAME]: [MSG]
- move from ALOG to LOG on DnsProxyListener
- adjust severity for some logs
- correct print format on uint8_t type
Bug: 128736560
Test: builds, boots
Test: atest resolv_integration_test
Change-Id: I0ff03824901168165bbe1f5abae9ff3e74db63d6
diff --git a/server/thread_util.h b/server/thread_util.h
index f32aacd..895ec57 100644
--- a/server/thread_util.h
+++ b/server/thread_util.h
@@ -20,6 +20,8 @@
#include <pthread.h>
#include <memory>
+#include <android-base/logging.h>
+
namespace android {
namespace net {
@@ -53,7 +55,7 @@
pthread_t thread;
rval = pthread_create(&thread, &scoped_attr.attr, &runAndDelete<T>, obj);
if (rval != 0) {
- ALOGW("pthread_create failed: %d", rval);
+ LOG(WARNING) << __func__ << ": pthread_create failed: " << rval;
return -rval;
}