Log when service name pattern doesn't match

This commit is contained in:
C. McEnroe 2020-08-15 17:50:19 -04:00
parent f67269202e
commit a2c5773b03
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,7 @@ static void parseControl(char *command) {
}
while (command) {
bool found = false;
char *pattern = strsep(&command, WS);
for (size_t i = 0; i < services.len; ++i) {
struct Service *service = &services.ptr[i];
@ -157,7 +158,9 @@ static void parseControl(char *command) {
} else {
fn(service);
}
found = true;
}
if (!found) syslog(LOG_NOTICE, "no services matching %s", pattern);
}
}