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

index 39507284a2382578ec11814ed13bc22b4cfd7cdf..0bcde14620a4f1e7ffdf4b15c6b32ab39be9702b 100644 (file)
@@ -33,7 +33,7 @@ id2entry_add( Backend *be, Entry *e )
        ldbm_datum_init( data );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_add: (%s)%ld\n", e->e_dn, e->e_id ));
 #else
        Debug( LDAP_DEBUG_TRACE, "=> id2entry_add( %ld, \"%s\" )\n", e->e_id,
@@ -44,7 +44,7 @@ id2entry_add( Backend *be, Entry *e )
        if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
            == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_add: could not open/create id2entry%s\n",
                           LDBM_SUFFIX ));
 #else
@@ -76,7 +76,7 @@ id2entry_add( Backend *be, Entry *e )
        ldbm_cache_close( be, db );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_add: return %d\n", rc ));
 #else
        Debug( LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 );
@@ -98,7 +98,7 @@ id2entry_delete( Backend *be, Entry *e )
 #endif
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_delete: (%s)%ld\n", e->e_dn, e->e_id ));
 #else
        Debug(LDAP_DEBUG_TRACE, "=> id2entry_delete( %ld, \"%s\" )\n", e->e_id,
@@ -118,7 +118,7 @@ id2entry_delete( Backend *be, Entry *e )
        if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
                == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_delete: could not open/create id2entry%s\n",
                           LDBM_SUFFIX ));
 #else
@@ -131,7 +131,7 @@ id2entry_delete( Backend *be, Entry *e )
 
        if ( cache_delete_entry( &li->li_cache, e ) != 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_delete: Could not delete (%s)%ld from cache\n",
                           e->e_dn, e->e_id ));
 #else
@@ -154,7 +154,7 @@ id2entry_delete( Backend *be, Entry *e )
        ldbm_cache_close( be, db );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_delete: return %d\n", rc ));
 #else
        Debug( LDAP_DEBUG_TRACE, "<= id2entry_delete %d\n", rc, 0, 0 );
@@ -179,7 +179,7 @@ id2entry_rw( Backend *be, ID id, int rw )
        ldbm_datum_init( data );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_rw: %s (%ld)\n",
                   rw ? "write" : "read", id ));
 #else
@@ -190,7 +190,7 @@ id2entry_rw( Backend *be, ID id, int rw )
 
        if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_DETAIL1,
                           "id2entry_rw: %s (%ld) 0x%lx (cache).\n",
                           rw ? "write" : "read", id, (unsigned long)e ));
 #else
@@ -204,7 +204,7 @@ id2entry_rw( Backend *be, ID id, int rw )
        if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
                == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_rw: could not open id2entry%s\n", LDBM_SUFFIX ));
 #else
                Debug( LDAP_DEBUG_ANY, "Could not open id2entry%s\n",
@@ -226,7 +226,7 @@ id2entry_rw( Backend *be, ID id, int rw )
 
        if ( data.dptr == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_rw: (%ld) not found\n", id ));
 #else
                Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) not found\n",
@@ -243,7 +243,7 @@ id2entry_rw( Backend *be, ID id, int rw )
 
        if ( e == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_rw: %s of %ld failed\n",
                           rw ? "write" : "read", id ));
 #else
@@ -265,7 +265,7 @@ id2entry_rw( Backend *be, ID id, int rw )
                 */
                if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
+                       LDAP_LOG(( "id2entry", LDAP_LEVEL_DETAIL1,
                                   "id2entry_rw: %s of %ld 0x%lx (cache)\n",
                                   rw ? "write" : "read", id, (unsigned long)e ));
 #else
@@ -277,7 +277,7 @@ id2entry_rw( Backend *be, ID id, int rw )
                }
 
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "id2entry", LDAP_LEVEL_ERR,
                           "id2entry_rw: %s of %ld (cache add failed)\n",
                           rw ? "write" : "read", id ));
 #else
@@ -289,7 +289,7 @@ id2entry_rw( Backend *be, ID id, int rw )
        }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "id2entry", LDAP_LEVEL_ENTRY,
                   "id2entry_rw: %s of %ld 0x%lx (disk)\n",
                   rw ? "write" : "read", id, (unsigned long)e ));
 #else
index e5f369a4b123f2156fd358100e09cdb3d7a6829c..48a0b65f699b97548d195e6b1e3e859e029ef27a 100644 (file)
@@ -104,7 +104,7 @@ idl_free( ID_BLOCK *idl )
 {
        if ( idl == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+               LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                           "idl_free: called with NULL pointer\n" ));
 #else
                Debug( LDAP_DEBUG_TRACE,
@@ -217,7 +217,7 @@ idl_fetch(
 
                if ( (tmp[i] = idl_fetch_one( be, db, data )) == NULL ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+                       LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                                   "idl_fetch: idl_fetch_one returned NULL\n" ));
 #else
                        Debug( LDAP_DEBUG_ANY,
@@ -259,7 +259,7 @@ idl_fetch(
 #endif
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "cache", LDAP_LEVEL_ENTRY,
+       LDAP_LOG(( "idl", LDAP_LEVEL_ENTRY,
                   "idl_fetch: %ld ids (%ld max)\n",
                   ID_BLOCK_NIDS(idl), ID_BLOCK_NMAXN(idl) ));
 #else
@@ -408,7 +408,7 @@ idl_change_first(
        /* delete old key block */
        if ( (rc = ldbm_cache_delete( db, bkey )) != 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+               LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                           "idl_change_first: ldbm_cache_delete returned %d\n", rc ));
 #else
                Debug( LDAP_DEBUG_ANY,
@@ -424,7 +424,7 @@ idl_change_first(
 
        if ( (rc = idl_store( be, db, bkey, b )) != 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+               LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                           "idl_change_first: idl_store returned %d\n", rc ));
 #else
                Debug( LDAP_DEBUG_ANY,
@@ -438,7 +438,7 @@ idl_change_first(
        ID_BLOCK_ID(h, pos) = ID_BLOCK_ID(b, 0);
        if ( (rc = idl_store( be, db, hkey, h )) != 0 ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+               LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                           "idl_change_first: idl_store returned %s\n", rc ));
 #else
                Debug( LDAP_DEBUG_ANY,
@@ -572,7 +572,7 @@ idl_insert_key(
 
        if ( (tmp = idl_fetch_one( be, db, k2 )) == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
                           "idl_insert_key: nonexistent continuation block\n" ));
 #else
                Debug( LDAP_DEBUG_ANY, "idl_insert_key: nonexistent continuation block\n",
@@ -589,7 +589,7 @@ idl_insert_key(
        case 0:         /* id inserted ok */
                if ( (rc = idl_store( be, db, k2, tmp )) != 0 ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
+                       LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
                                   "ids_insert_key: idl_store returned %d\n", rc ));
 #else
                        Debug( LDAP_DEBUG_ANY,
@@ -632,7 +632,7 @@ idl_insert_key(
                        cont_id( &k2, ID_BLOCK_ID(idl, i) );
                        if ( (tmp2 = idl_fetch_one( be, db, k2 )) == NULL ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
+                               LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
                                           "idl_insert_key: idl_fetch_one returned NULL\n"));
 #else
                                Debug( LDAP_DEBUG_ANY,
@@ -661,7 +661,7 @@ idl_insert_key(
 
                            if ( (rc = idl_store( be, db, k2, tmp )) != 0 ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG(( "cache", LDAP_LEVEL_ERR,
+                               LDAP_LOG(( "idl", LDAP_LEVEL_ERR,
                                               "idl_insert_key: idl_store returned %d\n", rc ));
 #else
                                Debug( LDAP_DEBUG_ANY,
@@ -692,7 +692,7 @@ idl_insert_key(
                                         */
                                if ( rc == 2 ) {
 #ifdef NEW_LOGGING
-                                       LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+                                       LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                                                   "idl_insert_key: id %ld is already in next block\n", 
                                                   id ));
 #else
@@ -947,7 +947,7 @@ idl_delete_key (
 
                if ( (tmp = idl_fetch_one( be, db, data )) == NULL ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "cache", LDAP_LEVEL_INFO,
+                       LDAP_LOG(( "idl", LDAP_LEVEL_INFO,
                                   "idl_delete_key: idl_fetch_one returned NULL\n" ));
 #else
                        Debug( LDAP_DEBUG_ANY,