]> git.sur5r.net Git - openldap/commitdiff
Added LDAP_LOG messages
authorJulius Enarusai <julius@openldap.org>
Tue, 26 Mar 2002 22:17:08 +0000 (22:17 +0000)
committerJulius Enarusai <julius@openldap.org>
Tue, 26 Mar 2002 22:17:08 +0000 (22:17 +0000)
servers/slapd/back-bdb/referral.c

index 64f61825669ce012b5a6062d9163addbb1d95cb2..8166d3da05688f276f9f56a61e1ea54eb098727a 100644 (file)
@@ -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,