Hello,

this patch adds "result" codes to error messages in persistent search code.

Petr^2 Spacek
From f6cb53278d8f39ac6da4fb8e26820f6ee02ae6e3 Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Wed, 12 Sep 2012 12:27:51 +0200
Subject: [PATCH] Improve persistent search logging.

Signed-off-by: Petr Spacek <pspa...@redhat.com>
---
 src/ldap_helper.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index d9c7ce5d84c3944a86ff1865ff6be073ddc294c8..92edbe7159272772e1c993d46da7c93382cbc5d4 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -3069,9 +3069,9 @@ update_zone(isc_task_t *task, isc_event_t *event)
 
 cleanup:
 	if (result != ISC_R_SUCCESS)
-		log_error("update_action (psearch) failed for '%s': %s. "
+		log_error_r("update_zone (psearch) failed for '%s'. "
 			  "Zones can be outdated, run `rndc reload`",
-			  pevent->dn, isc_result_totext(result));
+			  pevent->dn);
 
 	ldap_query_free(ISC_FALSE, &ldap_qresult_zone);
 	ldap_query_free(ISC_FALSE, &ldap_qresult_record);
@@ -3125,7 +3125,7 @@ update_config(isc_task_t *task, isc_event_t *event)
 
 cleanup:
 	if (result != ISC_R_SUCCESS)
-		log_error("update_config (psearch) failed for %s. "
+		log_error_r("update_config (psearch) failed for '%s'. "
 			  "Configuration can be outdated, run `rndc reload`",
 			  pevent->dn);
 
@@ -3221,9 +3221,9 @@ update_record(isc_task_t *task, isc_event_t *event)
 	}
 cleanup:
 	if (result != ISC_R_SUCCESS)
-		log_error("update_record (psearch) failed, dn '%s'. "
+		log_error_r("update_record (psearch) failed, dn '%s' change type 0x%x. "
 			  "Records can be outdated, run `rndc reload`",
-			  pevent->dn);
+			  pevent->dn, pevent->chgtype);
 
 	if (dns_name_dynamic(&name))
 		dns_name_free(&name, inst->mctx);
@@ -3400,7 +3400,7 @@ cleanup:
 		if (prevdn_ldap != NULL)
 			ldap_memfree(prevdn);
 
-		log_error("psearch_update failed for %s zone. "
+		log_error_r("psearch_update failed for '%s' zone. "
 			  "Zone can be outdated, run `rndc reload`",
 			  entry->dn);
 	}
@@ -3586,7 +3586,7 @@ restart:
 				 * Error means inconsistency of our zones
 				 * data.
 				 */
-				log_error("ldap_psearch_watcher failed, zones "
+				log_error_r("ldap_psearch_watcher failed, zones "
 					  "might be outdated. Run `rndc reload`");
 				goto soft_err;
 			}
-- 
1.7.11.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to