[icinga-checkins] icinga.org: icinga2/feature/opt: WIP3

git at icinga.org git at icinga.org
Sun Aug 21 09:00:50 CEST 2016


Module: icinga2
Branch: feature/opt
Commit: a1785845d70d73c3900e91a755a7df85e6d80d5e
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=a1785845d70d73c3900e91a755a7df85e6d80d5e

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Sun Aug 21 09:00:45 2016 +0200

WIP3

---

 lib/icinga/hostgroup.cpp    |    2 ++
 lib/icinga/servicegroup.cpp |    2 ++
 lib/icinga/usergroup.cpp    |    2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/icinga/hostgroup.cpp b/lib/icinga/hostgroup.cpp
index e862624..e68e81d 100644
--- a/lib/icinga/hostgroup.cpp
+++ b/lib/icinga/hostgroup.cpp
@@ -53,8 +53,10 @@ bool HostGroup::EvaluateObjectRule(const Host::Ptr& host, const ConfigItem::Ptr&
 	if (!group->GetFilter()->Evaluate(frame).GetValue().ToBool())
 		return false;
 
+#ifdef I2_DEBUG
 	Log(LogDebug, "HostGroup")
 	    << "Assigning membership for group '" << group_name << "' to host '" << host->GetName() << "'";
+#endif /* I2_DEBUG */
 
 	Array::Ptr groups = host->GetGroups();
 	groups->Add(group_name);
diff --git a/lib/icinga/servicegroup.cpp b/lib/icinga/servicegroup.cpp
index 1753ba5..d1f871d 100644
--- a/lib/icinga/servicegroup.cpp
+++ b/lib/icinga/servicegroup.cpp
@@ -56,8 +56,10 @@ bool ServiceGroup::EvaluateObjectRule(const Service::Ptr& service, const ConfigI
 	if (!group->GetFilter()->Evaluate(frame).GetValue().ToBool())
 		return false;
 
+#ifdef I2_DEBUG
 	Log(LogDebug, "ServiceGroup")
 	    << "Assigning membership for group '" << group_name << "' to service '" << service->GetName() << "'";
+#endif /* I2_DEBUG */
 
 	Array::Ptr groups = service->GetGroups();
 	groups->Add(group_name);
diff --git a/lib/icinga/usergroup.cpp b/lib/icinga/usergroup.cpp
index 654c473..ffc31e0 100644
--- a/lib/icinga/usergroup.cpp
+++ b/lib/icinga/usergroup.cpp
@@ -53,8 +53,10 @@ bool UserGroup::EvaluateObjectRule(const User::Ptr& user, const ConfigItem::Ptr&
 	if (!group->GetFilter()->Evaluate(frame).GetValue().ToBool())
 		return false;
 
+#ifdef I2_DEBUG
 	Log(LogDebug, "UserGroup")
 	    << "Assigning membership for group '" << group_name << "' to user '" << user->GetName() << "'";
+#endif /* I2_DEBUG */
 
 	Array::Ptr groups = user->GetGroups();
 	groups->Add(group_name);



More information about the icinga-checkins mailing list