diff options
author | Peiyong Lin <lpy@google.com> | 2019-02-06 14:57:53 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-02-06 14:57:53 -0800 |
commit | 36e11ac4c7b04680f3f279ce757e361033fc301e (patch) | |
tree | a981669541b8d9178520a5588e007c559a5b5088 | |
parent | 94755be33263ff696d48ca753ea68846c3d1f08f (diff) | |
parent | 0525e64e7a1d4cdad988b0bb2514183755e8059f (diff) |
Merge "[ConfigStore] Slient log spam." am: 925f06e87b am: 30e7ab464d
am: 0525e64e7a
Change-Id: I68717d4526035119a03ded21ac1cc83942cdec31
-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; |