Added with() and withValidation() methods in CLogCategoryList.

This commit is contained in:
Mat Sutcliffe
2019-03-02 18:23:52 +00:00
parent 1cb21f0a4b
commit a366ad8943
15 changed files with 30 additions and 21 deletions

View File

@@ -171,7 +171,7 @@ namespace BlackMisc
CStatusMessageList CServer::validate() const
{
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation()}));
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
CStatusMessageList msgs;
if (this->getName().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, u"Missing name")); }
if (this->getAddress().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, u"Missing address")); }