]> git.sur5r.net Git - openldap/commitdiff
Added/Updated LDAP_LOG messages
authorJulius Enarusai <julius@openldap.org>
Wed, 10 Apr 2002 22:10:22 +0000 (22:10 +0000)
committerJulius Enarusai <julius@openldap.org>
Wed, 10 Apr 2002 22:10:22 +0000 (22:10 +0000)
servers/slapd/back-ldbm/dbcache.c
servers/slapd/back-ldbm/id2children.c

index 1187e6b2954b667407e8abf1db5081a72838283c..1cf5bf9bd129513fa49c448866285521dda9d8c9 100644 (file)
@@ -203,7 +203,7 @@ ldbm_cache_open(
 
 #ifdef NEW_LOGGING
        LDAP_LOG(( "cache", LDAP_LEVEL_DETAIL1,
-                  "ldbm_cache_open: opened %d\n", i ));
+                  "<= ldbm_cache_open: (opened %d)\n", i ));
 #else
        Debug( LDAP_DEBUG_TRACE, "<= ldbm_cache_open (opened %d)\n", i, 0, 0 );
 #endif
@@ -311,8 +311,13 @@ ldbm_cache_sync( Backend *be )
        ldap_pvt_thread_mutex_lock( &li->li_dbcache_mutex );
        for ( i = 0; i < MAXDBCACHE; i++ ) {
                if ( li->li_dbcache[i].dbc_name != NULL && li->li_dbcache[i].dbc_dirty ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync: "
+                               "ldbm syncing db (%s)\n", li->li_dbcache[i].dbc_name ));
+#else
                        Debug(  LDAP_DEBUG_TRACE, "ldbm syncing db (%s)\n",
                                li->li_dbcache[i].dbc_name, 0, 0 );
+#endif
                        ldbm_sync( li->li_dbcache[i].dbc_db );
                        li->li_dbcache[i].dbc_dirty = 0;
                }
@@ -385,7 +390,12 @@ ldbm_cache_sync_daemon(
        Backend *be = (Backend *)be_ptr;
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "dbcache", LDAP_LEVEL_ARGS, "ldbm_cache_sync_daemon:"
+               " synchronizer starting for %s\n", li->li_directory ));
+#else
        Debug( LDAP_DEBUG_ANY, "synchronizer starting for %s\n", li->li_directory, 0, 0 );
+#endif
   
        while (!li->li_dbshutdown) {
                int i = li->li_dbsyncwaitn;
@@ -393,18 +403,33 @@ ldbm_cache_sync_daemon(
                sleep( li->li_dbsyncfreq );
 
                while (i && ldap_pvt_thread_pool_backload(&connection_pool) != 0) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
+                               " delay syncing %s\n", li->li_directory ));
+#else
                        Debug( LDAP_DEBUG_TRACE, "delay syncing %s\n", li->li_directory, 0, 0 );
+#endif
                        sleep(li->li_dbsyncwaitinterval);
                        i--;
                }
 
                if (!li->li_dbshutdown) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
+                               " syncing %s\n", li->li_directory ));
+#else
                        Debug( LDAP_DEBUG_TRACE, "syncing %s\n", li->li_directory, 0, 0 );
+#endif
                        ldbm_cache_sync( be );
                }
        }
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "dbcache", LDAP_LEVEL_DETAIL1, "ldbm_cache_sync_daemon:"
+                               " synchronizer stopping\n" ));
+#else
        Debug( LDAP_DEBUG_ANY, "synchronizer stopping\n", 0, 0, 0 );
+#endif
   
        return NULL;
 }
index 9215aaa4dfc751d807add9805ea63950b444de0e..c27496d5730b6f5a47e6370ee3ba6c71239f56a8 100644 (file)
@@ -30,7 +30,7 @@ has_children(
        ldbm_datum_init( key );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2children", LDAP_LEVEL_ENTRY,
                   "has_children: enter %ld\n", p->e_id ));
 #else
        Debug( LDAP_DEBUG_TRACE, "=> has_children( %ld )\n", p->e_id , 0, 0 );
@@ -40,7 +40,7 @@ has_children(
        if ( (db = ldbm_cache_open( be, "dn2id", LDBM_SUFFIX,
            LDBM_WRCREAT )) == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2children", LDAP_LEVEL_ERR,
                           "has_children: could not open \"dn2id%s\"\n",
                           LDBM_SUFFIX ));
 #else
@@ -68,7 +68,7 @@ has_children(
        }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2children", LDAP_LEVEL_ENTRY,
                   "has_children: id (%ld) %s children.\n",
                   p->e_id, rc ? "has" : "doesn't have" ));
 #else