mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 09:03:37 +08:00
Print warning on failure to match debug category
This commit is contained in:
parent
a7aca37f9b
commit
a0faac400d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user