Loading configstore/utils/ConfigStoreUtils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading configstore/utils/include/configstore/Utils.h +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 = "); Loading @@ -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; Loading Loading
configstore/utils/ConfigStoreUtils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading
configstore/utils/include/configstore/Utils.h +4 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 = "); Loading @@ -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; Loading