From: Julius Enarusai Date: Tue, 26 Mar 2002 22:17:08 +0000 (+0000) Subject: Added LDAP_LOG messages X-Git-Tag: OPENLDAP_REL_ENG_2_MP~304 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=82cd03550536328ca3b3105632aec176c52046c1;p=openldap Added LDAP_LOG messages --- diff --git a/servers/slapd/back-bdb/referral.c b/servers/slapd/back-bdb/referral.c index 64f6182566..8166d3da05 100644 --- a/servers/slapd/back-bdb/referral.c +++ b/servers/slapd/back-bdb/referral.c @@ -44,9 +44,15 @@ bdb_referrals( case 0: break; default: +#ifdef NEW_LOGGING + LDAP_LOG (( "referral", LDAP_LEVEL_ERR, + "bdb_referrals: dn2entry failed: %s (%d)\n", + db_strerror(rc), rc )); +#else Debug( LDAP_DEBUG_TRACE, "bdb_referrals: dn2entry failed: %s (%d)\n", db_strerror(rc), rc, 0 ); +#endif if (e != NULL) { bdb_cache_return_entry_r(&bdb->bi_cache, e); } @@ -65,9 +71,15 @@ bdb_referrals( if ( matched != NULL ) { matched_dn = ch_strdup( matched->e_dn ); +#ifdef NEW_LOGGING + LDAP_LOG (( "referral", LDAP_LEVEL_DETAIL1, + "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n", + (long) op->o_tag, dn->bv_val, matched_dn )); +#else Debug( LDAP_DEBUG_TRACE, "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n", (long) op->o_tag, dn->bv_val, matched_dn ); +#endif if( is_entry_referral( matched ) ) { rc = LDAP_OTHER; @@ -103,9 +115,15 @@ bdb_referrals( BerVarray rrefs = referral_rewrite( refs, &e->e_name, dn, LDAP_SCOPE_DEFAULT ); +#ifdef NEW_LOGGING + LDAP_LOG (( "referral", LDAP_LEVEL_DETAIL1, + "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n", + (long) op->o_tag, dn->bv_val, e->e_dn )); +#else Debug( LDAP_DEBUG_TRACE, "bdb_referrals: op=%ld target=\"%s\" matched=\"%s\"\n", (long) op->o_tag, dn->bv_val, e->e_dn ); +#endif if( rrefs != NULL ) { send_ldap_result( conn, op, rc = LDAP_REFERRAL,