From: Gunnar Beutner Date: Wed, 27 Mar 2013 12:49:58 +0000 (+0100) Subject: Add some debug output in the config compiler. X-Git-Tag: v0.0.2~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96b1bd194384e0b80f754cb9ec3f452a5b0f000c;p=icinga2 Add some debug output in the config compiler. --- diff --git a/lib/config/configcompilercontext.cpp b/lib/config/configcompilercontext.cpp index 0f38cb33c..0404f7cb6 100644 --- a/lib/config/configcompilercontext.cpp +++ b/lib/config/configcompilercontext.cpp @@ -113,6 +113,8 @@ void ConfigCompilerContext::LinkItems(void) { SetContext(this); + Log(LogInformation, "config", "Linking config items..."); + BOOST_FOREACH(const ConfigItem::Ptr& item, m_Items) { item->Link(); } @@ -124,6 +126,8 @@ void ConfigCompilerContext::ValidateItems(void) { SetContext(this); + Log(LogInformation, "config", "Validating config items..."); + BOOST_FOREACH(const ConfigItem::Ptr& item, m_Items) { ConfigType::Ptr ctype; diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index bb884fd69..397bf2013 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -33,6 +33,7 @@ Expression::Expression(const String& key, ExpressionOperator op, const Value& value, const DebugInfo& debuginfo) : m_Key(key), m_Operator(op), m_Value(value), m_DebugInfo(debuginfo) { + ASSERT(op != OperatorExecute || value.IsObjectType()); } void Expression::Execute(const Dictionary::Ptr& dictionary) const