From: Michael Friedrich Date: Mon, 16 Dec 2013 08:39:14 +0000 (+0100) Subject: Only print config validation for existing objects. X-Git-Tag: v0.0.6~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9452bc70950e5c64f2fc2fc43a2af41c79d9bcf7;p=icinga2 Only print config validation for existing objects. Refs #5298 --- diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 79bbfa0e8..b606bc382 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -315,7 +315,8 @@ bool ConfigItem::ActivateItems(bool validateOnly) /* log stats for external parsers */ BOOST_FOREACH(const DynamicType::Ptr& type, DynamicType::GetTypes()) { - Log(LogInformation, "config", "Checked " + Convert::ToString(type->GetObjects().size()) + " " + type->GetName() + "(s)."); + if (type->GetObjects().size() > 0) + Log(LogInformation, "config", "Checked " + Convert::ToString(type->GetObjects().size()) + " " + type->GetName() + "(s)."); } if (ConfigCompilerContext::GetInstance()->HasErrors())