MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetLogCategory

Function GetLogCategory

src/logging.cpp:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201bool GetLogCategory(BCLog::LogFlags& flag, const std::string& str)
202{
203 if (str == "") {
204 flag = BCLog::ALL;
205 return true;
206 }
207 const std::string &category = StrToUpper(str);
208 for (auto& categoryPair : LOG_CATEGORY_MAP) {
209 if (categoryPair.second == category) {
210 flag = categoryPair.first;
211 return true;
212 }
213 }
214 return false;
215}
216
217std::string ListLogCategories()
218{

Callers 2

EnableCategoryMethod · 0.85
DisableCategoryMethod · 0.85

Calls 1

StrToUpperFunction · 0.85

Tested by

no test coverage detected