From a0faac400d8d36029c9e1656653adaceca264fed Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Fri, 15 May 2020 17:54:39 -0500 Subject: [PATCH] Print warning on failure to match debug category --- src/flog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/flog.cpp b/src/flog.cpp index 5686fb487..1a64ef228 100644 --- a/src/flog.cpp +++ b/src/flog.cpp @@ -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) {