Display a count of total rules added on load

This commit is contained in:
Noikoio 2017-09-05 09:10:46 -07:00
parent 01b2ef1f1b
commit 120f31a88b
2 changed files with 4 additions and 3 deletions

View file

@ -35,9 +35,9 @@ namespace Noikoio.RegexBot.Feature.AutoMod
string label = def.Name;
var rule = new Rule(this, def);
rules.Add(rule);
await Log($"Added rule '{rule.Label}'");
}
if (rules.Count > 0)
await Log($"Loaded {rules.Count} rule(s) from configuration.");
return rules.AsReadOnly();
}

View file

@ -50,9 +50,10 @@ namespace Noikoio.RegexBot.Feature.AutoRespond
// All validation is left to the constructor
var resp = new ResponseDefinition(def);
responses.Add(resp);
await Log($"Added definition '{resp.Label}'");
}
if (responses.Count > 0)
await Log($"Loaded {responses.Count} definition(s) from configuration.");
return responses.AsReadOnly();
}
}