From d06411939cddf61e7547760c2c4a1f2e24ca6518 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Apr 07 2021 22:24:54 +0000 Subject: Fix: scheduler: Change trace output in populate_hash. Only show the "Setting attribute:" text when it comes time to actually set the attribute. Also show the value being set. This makes it clearer that an attribute is actually being set, not just that the function is processing something. --- diff --git a/lib/pengine/rules.c b/lib/pengine/rules.c index 7575011..b0fca55 100644 --- a/lib/pengine/rules.c +++ b/lib/pengine/rules.c @@ -463,7 +463,6 @@ populate_hash(xmlNode * nvpair_list, GHashTable * hash, gboolean overwrite, xmlN name = crm_element_value(ref_nvpair, XML_NVPAIR_ATTR_NAME); } - crm_trace("Setting attribute: %s", name); value = crm_element_value(an_attr, XML_NVPAIR_ATTR_VALUE); if (value == NULL) { value = crm_element_value(ref_nvpair, XML_NVPAIR_ATTR_VALUE); @@ -471,7 +470,6 @@ populate_hash(xmlNode * nvpair_list, GHashTable * hash, gboolean overwrite, xmlN if (name == NULL || value == NULL) { continue; - } old_value = g_hash_table_lookup(hash, name); @@ -484,6 +482,7 @@ populate_hash(xmlNode * nvpair_list, GHashTable * hash, gboolean overwrite, xmlN continue; } else if (old_value == NULL) { + crm_trace("Setting attribute: %s = %s", name, value); g_hash_table_insert(hash, strdup(name), strdup(value)); } else if (overwrite) {