]> granicus.if.org Git - icinga2/commitdiff
Add some debug output in the config compiler.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 27 Mar 2013 12:49:58 +0000 (13:49 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 27 Mar 2013 12:49:58 +0000 (13:49 +0100)
lib/config/configcompilercontext.cpp
lib/config/expression.cpp

index 0f38cb33cab07145fd12d6615e04028ad9a0f3b3..0404f7cb60de1dde61f02edbbd91133d3473c871 100644 (file)
@@ -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;
 
index bb884fd69d1663c1c55277ba80d57d1fb18d1b10..397bf2013f1f36a174a0c9bce45ef56efc36351d 100644 (file)
@@ -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<ExpressionList>());
 }
 
 void Expression::Execute(const Dictionary::Ptr& dictionary) const