From: Julius Enarusai Date: Fri, 5 Apr 2002 18:38:59 +0000 (+0000) Subject: Added LDAP_LOG messages X-Git-Tag: OPENLDAP_REL_ENG_2_MP~248 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f57d33f63632e5d9a8c10e9cba99d274bf44d6f4;p=openldap Added LDAP_LOG messages --- diff --git a/servers/slapd/back-ldbm/config.c b/servers/slapd/back-ldbm/config.c index c9a9b2571e..3c8475024e 100644 --- a/servers/slapd/back-ldbm/config.c +++ b/servers/slapd/back-ldbm/config.c @@ -106,18 +106,31 @@ ldbm_back_db_config( #ifndef NO_THREADS int i; if ( argc < 2 ) { +#ifdef NEW_LOGGING + LDAP_LOG (( "config", LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: " + "line %d: missing frequency value in \"dbsync " + "[ [wait-interval]]\" line\n", fname, lineno )); +#else Debug( LDAP_DEBUG_ANY, "%s: line %d: missing frquency value in \"dbsync [ [wait-interval]]\" line\n", fname, lineno, 0 ); +#endif return 1; } i = atoi( argv[1] ); if( i < 0 ) { +#ifdef NEW_LOGGING + LDAP_LOG (( "config", LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: " + "line %d: frequency value (%d) invalid \"dbsync " + " [ [wait-interval]]\" line\n", + fname, lineno, i )); +#else Debug( LDAP_DEBUG_ANY, "%s: line %d: frquency value (%d) invalid \"dbsync [ [wait-interval]]\" line\n", fname, lineno, i ); +#endif return 1; } @@ -126,9 +139,16 @@ ldbm_back_db_config( if ( argc > 2 ) { i = atoi( argv[2] ); if ( i < 0 ) { +#ifdef NEW_LOGGING + LDAP_LOG (( "config",LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: " + "line %d: frequency value (%d) invalid \"dbsync " + " [ [wait-interval]]\" line\n", + fname, lineno, i )); +#else Debug( LDAP_DEBUG_ANY, "%s: line %d: frquency value (%d) invalid \"dbsync [ [wait-interval]]\" line\n", fname, lineno, i ); +#endif return 1; } li ->li_dbsyncwaitn = i; @@ -137,9 +157,16 @@ ldbm_back_db_config( if ( argc > 3 ) { i = atoi( argv[3] ); if ( i <= 0 ) { +#ifdef NEW_LOGGING + LDAP_LOG (( "config",LDAP_LEVEL_ERR, "ldbm_back_db_config: %s: " + "line %d: frequency value (%d) invalid \"dbsync " + " [ [wait-interval]]\" line\n", + fname, lineno, i )); +#else Debug( LDAP_DEBUG_ANY, "%s: line %d: frquency value (%d) invalid \"dbsync [ [wait-interval]]\" line\n", fname, lineno, i ); +#endif return 1; } li ->li_dbsyncwaitinterval = i; @@ -149,8 +176,13 @@ ldbm_back_db_config( li->li_dbwritesync = 0; #else +#ifdef NEW_LOGGING + LDAP_LOG (( "config",LDAP_LEVEL_ERR, "ldbm_back_db_config: "\"dbsync\"" + " policies not supported in non-threaded environments\n" )); +#else Debug( LDAP_DEBUG_ANY, "\"dbsync\" policies not supported in non-threaded environments\n", 0, 0, 0); +#endif return 1; #endif diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index e7b7310821..ada60432c2 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -200,8 +200,13 @@ ldbm_back_db_open( if ( rc != 0 ) { +#ifdef NEW_LOGGING + LDAP_LOG (( "init", LDAP_LEVEL_ERR, "ldbm_back_db_open: sync " + "ldap_pvt_thread_create failed (%d)\n", rc )); +#else Debug( LDAP_DEBUG_ANY, "sync ldap_pvt_thread_create failed (%d)\n", rc, 0, 0 ); +#endif return 1; } }