MCPcopy Create free account
hub / github.com/ElementsProject/elements / LogCategoriesList

Method LogCategoriesList

src/logging.cpp:277–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277std::vector<LogCategory> BCLog::Logger::LogCategoriesList() const
278{
279 // Sort log categories by alphabetical order.
280 std::array<CLogCategoryDesc, std::size(LogCategories)> categories;
281 std::copy(std::begin(LogCategories), std::end(LogCategories), categories.begin());
282 std::sort(categories.begin(), categories.end(), [](auto a, auto b) { return a.category < b.category; });
283
284 std::vector<LogCategory> ret;
285 for (const CLogCategoryDesc& category_desc : categories) {
286 if (category_desc.flag == BCLog::NONE || category_desc.flag == BCLog::ALL) continue;
287 LogCategory catActive;
288 catActive.category = category_desc.category;
289 catActive.active = WillLogCategory(category_desc.flag);
290 ret.push_back(catActive);
291 }
292 return ret;
293}
294
295std::string BCLog::Logger::LogTimestampStr(const std::string& str)
296{

Callers 1

loggingFunction · 0.80

Calls 5

beginFunction · 0.85
endFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected