Print warning on failure to match debug category

This commit is contained in:
Charles Gould 2020-05-15 17:54:39 -05:00 committed by Johannes Altmanninger
parent a7aca37f9b
commit a0faac400d

View File

@ -88,11 +88,16 @@ using namespace flog_details;
/// For each category, if its name matches the wildcard, set its enabled to the given sense.
static void apply_one_wildcard(const wcstring &wc_esc, bool sense) {
wcstring wc = parse_util_unescape_wildcards(wc_esc);
bool match_found = false;
for (category_t *cat : s_all_categories) {
if (wildcard_match(cat->name, wc)) {
cat->enabled = sense;
match_found = true;
}
}
if (!match_found) {
fprintf(stderr, "Failed to match debug category: %ls\n", wc_esc.c_str());
}
}
void activate_flog_categories_by_pattern(const wcstring &inwc) {