diff options
author | Peiyong Lin <lpy@google.com> | 2019-02-05 17:46:14 -0800 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2019-02-06 11:05:14 -0800 |
commit | 09dbd3df37fe009217638ab4d0010be3bfe891d6 (patch) | |
tree | 7fc0a9650081bf73166178974031eb323d5354ec /configstore/utils | |
parent | 892624d06d1bc2e96bf1fde81318c756c6c9384f (diff) | |
download | platform_hardware_interfaces-09dbd3df37fe009217638ab4d0010be3bfe891d6.tar.gz platform_hardware_interfaces-09dbd3df37fe009217638ab4d0010be3bfe891d6.tar.bz2 platform_hardware_interfaces-09dbd3df37fe009217638ab4d0010be3bfe891d6.zip |
[ConfigStore] Slient log spam.
Previously ConfigStore keeps logging info of each function, this patch moves it
to verbose to avoid log spam.
BUG: 123312783
Test: Build, flash and boot. Verify with adb logcat
Change-Id: I8dce745122ca05d18cd899c536342521432f5325
Diffstat (limited to 'configstore/utils')
-rw-r--r-- | configstore/utils/ConfigStoreUtils.cpp | 8 | ||||
-rw-r--r-- | configstore/utils/include/configstore/Utils.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/configstore/utils/ConfigStoreUtils.cpp b/configstore/utils/ConfigStoreUtils.cpp index 5a1fb42e27..8cb61a91e1 100644 --- a/configstore/utils/ConfigStoreUtils.cpp +++ b/configstore/utils/ConfigStoreUtils.cpp @@ -23,12 +23,12 @@ namespace android { namespace hardware { namespace details { -bool wouldLogInfo() { - return WOULD_LOG(INFO); +bool wouldLogVerbose() { + return WOULD_LOG(VERBOSE); } -void logAlwaysInfo(const std::string& message) { - LOG(INFO) << message; +void logAlwaysVerbose(const std::string& message) { + LOG(VERBOSE) << message; } void logAlwaysError(const std::string& message) { diff --git a/configstore/utils/include/configstore/Utils.h b/configstore/utils/include/configstore/Utils.h index e04f57df12..d65f41f85b 100644 --- a/configstore/utils/include/configstore/Utils.h +++ b/configstore/utils/include/configstore/Utils.h @@ -29,8 +29,8 @@ namespace hardware { namespace details { // Templated classes can use the below method // to avoid creating dependencies on liblog. -bool wouldLogInfo(); -void logAlwaysInfo(const std::string& message); +bool wouldLogVerbose(); +void logAlwaysVerbose(const std::string& message); void logAlwaysError(const std::string& message); } // namespace details @@ -92,7 +92,7 @@ decltype(V::value) get(const decltype(V::value) &defValue) { }; static V cachedValue = getHelper(); - if (wouldLogInfo()) { + if (wouldLogVerbose()) { std::string iname = __PRETTY_FUNCTION__; // func name starts with "func = " in __PRETTY_FUNCTION__ auto pos = iname.find("func = "); @@ -107,7 +107,7 @@ decltype(V::value) get(const decltype(V::value) &defValue) { oss << iname << " retrieved: " << (cachedValue.specified ? cachedValue.value : defValue) << (cachedValue.specified ? "" : " (default)"); - logAlwaysInfo(oss.str()); + logAlwaysVerbose(oss.str()); } return cachedValue.specified ? cachedValue.value : defValue; |