]> git.sur5r.net Git - openldap/commitdiff
ITS#1730: Misc typos in NEW_LOGGING code from Hallvard
authorJulius Enarusai <julius@openldap.org>
Thu, 25 Apr 2002 22:12:44 +0000 (22:12 +0000)
committerJulius Enarusai <julius@openldap.org>
Thu, 25 Apr 2002 22:12:44 +0000 (22:12 +0000)
servers/slapd/back-meta/bind.c
servers/slapd/back-monitor/init.c
servers/slapd/config.c
servers/slapd/delete.c
servers/slurpd/ldap_op.c

index 185067962836d4f9d35868e1683905f9e730b472..808bb689099217f02146fa397ce8166bf3095ee8 100644 (file)
@@ -424,7 +424,7 @@ meta_back_op_result( struct metaconn *lc, Operation *op )
                        err = ldap_back_map_result( err );
 
 #ifdef NEW_LOGGING
-                       LDAP_LOG(( "backend", LDAP_DEBUG_ANY,
+                       LDAP_LOG(( "backend", LDAP_LEVEL_RESULTS,
                                        "meta_back_op_result: target"
                                        " <%d> sending msg \"%s\""
                                        " (matched \"%s\")\n",
index e855ae1c549e75be8a7ffdda3ed667f20d5354e8..692efd2d71961f01668f379154f99367fe7d9fc3 100644 (file)
@@ -522,7 +522,7 @@ monitor_back_db_config(
 )
 {
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "config", LDAP_DEBUG_CONFIG,
+       LDAP_LOG(( "config", LDAP_LEVEL_INFO,
                "line %d of file '%s' will be ignored\n", lineno, fname ));
 #else
        Debug( LDAP_DEBUG_CONFIG, 
index 94bd2f5dacb3f14e84111d5225e222d2d53fa9c8..e79dcc6252dab72695e8fb5f7b1e53e50a989070 100644 (file)
@@ -2163,7 +2163,7 @@ read_config( const char *fname )
                    }
                    if (module_path( cargv[1] )) {
 #ifdef NEW_LOGGING
-                          LDAP_LOG(( "cofig", LDAP_LEVEL_CRIT,
+                          LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
                                      "%s: line %d: failed to set module search path to %s.\n",
                                      fname, lineno, cargv[1] ));
 #else
index 38324be6eafd713367f1ce0d479e4c0d06bf770b..37a59aa1ea542ccd2390a3a9c5ce4e1c9bda94a3 100644 (file)
@@ -66,7 +66,7 @@ do_delete(
 
        if( ( rc = get_ctrls( conn, op, 1 ) ) != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "oepration", LDAP_LEVEL_ERR,
+               LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
                        "do_delete: conn %d  get_ctrls failed\n", conn->c_connid ));
 #else
                Debug( LDAP_DEBUG_ANY, "do_delete: get_ctrls failed\n", 0, 0, 0 );
index baa1f0fce26323d8b9310fba8be992c7cdd2dc57..66145f59e5079f8d64b801433f1d8b8ca14dfe1f 100644 (file)
@@ -85,7 +85,7 @@ do_ldap(
                        lderr = op_ldap_add( ri, re, errmsg );
                        if ( lderr != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG (( " ldap_op", LDAP_LEVEL_ERR, "do_ldap: "
+                               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
                                        "Error: ldap_add_s failed adding \"%s\": %s\n",
                                        *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
 #else
@@ -101,7 +101,7 @@ do_ldap(
                        lderr = op_ldap_modify( ri, re, errmsg );
                        if ( lderr != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG (( " ldap_op", LDAP_LEVEL_ERR, "do_ldap: "
+                               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
                                        "Error: ldap_modify_s failed modifying \"%s\": %s\n",
                                        *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
 #else
@@ -117,7 +117,7 @@ do_ldap(
                        lderr = op_ldap_delete( ri, re, errmsg );
                        if ( lderr != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG (( " ldap_op", LDAP_LEVEL_ERR, "do_ldap: "
+                               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
                                        "Error: ldap_delete_s failed deleting \"%s\": %s\n",
                                        *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
 #else
@@ -133,7 +133,7 @@ do_ldap(
                        lderr = op_ldap_modrdn( ri, re, errmsg );
                        if ( lderr != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                               LDAP_LOG (( " ldap_op", LDAP_LEVEL_ERR, "do_ldap: "
+                               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
                                        "Error: ldap_modrdn_s failed modifying %s: %s\n",
                                        *errmsg ? *errmsg : ldap_err2string( lderr ), re->re_dn ));
 #else
@@ -147,7 +147,7 @@ do_ldap(
 
                default:
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( " ldap_op", LDAP_LEVEL_ERR, "do_ldap: "
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_ldap: "
                                "Error: bad op \"%d\", dn = \"%s\"\n",
                                re->re_changetype, re->re_dn ));
 #else
@@ -221,7 +221,7 @@ op_ldap_add(
 
        /* Perform the operation */
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "op_ldap_add: replica %s:%d - add dn \"%s\"\n",
                ri->ri_hostname, ri->ri_port, re->re_dn ));
 #else
@@ -235,7 +235,7 @@ op_ldap_add(
     } else {
        *errmsg = "No modifications to do";
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                "op_ldap_add: Error: no mods to do (%s)!\n", re->re_dn ));
 #else
        Debug( LDAP_DEBUG_ANY,
@@ -277,7 +277,7 @@ op_ldap_modify(
     if ( re->re_mods == NULL ) {
        *errmsg = "No arguments given";
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                "op_ldap_modify: Error: no arguments\n" ));
 #else
        Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modify: no arguments\n",
@@ -330,7 +330,7 @@ op_ldap_modify(
        default:
            if ( state == AWAITING_OP ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modify: Error: unknown mod type \"%s\"\n", type ));
 #else
                Debug( LDAP_DEBUG_ANY,
@@ -348,7 +348,7 @@ op_ldap_modify(
             */
            if ( strcasecmp( type, ldm->mod_type )) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modify: Error: "
                        "malformed modify op, %s: %s (expecting \"%s\")\n", 
                        type, value, ldm->mod_type ));
@@ -375,7 +375,7 @@ op_ldap_modify(
     if ( nops > 0 ) {
        /* Actually perform the LDAP operation */
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_DETAIL1, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_DETAIL1, 
                "op_ldap_modify: replica %s:%d - modify dn \"%s\"\n", 
                ri->ri_hostname, ri->ri_port, re->re_dn ));
 #else
@@ -404,7 +404,7 @@ op_ldap_delete(
     int                rc;
 
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "op_ldap_delete: replica %s:%d - delete dn \"%s\"\n",
            ri->ri_hostname, ri->ri_port, re->re_dn ));
 #else
@@ -447,7 +447,7 @@ op_ldap_modrdn(
     if ( re->re_mods == NULL ) {
        *errmsg = "No arguments given";
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                "op_ldap_modrdn: Error: no arguments\n" ));
 #else
        Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modrdn: no arguments\n",
@@ -463,7 +463,7 @@ op_ldap_modrdn(
        if ( !strcmp( mi[ i ].mi_type, T_NEWRDNSTR )) {
                if( state & GOT_NEWRDN ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: multiple newrdn arg \"%s\"\n",
                        mi[ i ].mi_val ));
 #else
@@ -481,7 +481,7 @@ op_ldap_modrdn(
        } else if ( !strcmp( mi[ i ].mi_type, T_DELOLDRDNSTR )) {
                if( state & GOT_DELOLDRDN ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: multiple deleteoldrdn arg \"%s\"\n",
                        mi[ i ].mi_val ));
 #else
@@ -500,7 +500,7 @@ op_ldap_modrdn(
                drdnflag = 1;
            } else {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: bad deleteoldrdn arg \"%s\"\n",
                        mi[ i ].mi_val ));
 #else
@@ -515,7 +515,7 @@ op_ldap_modrdn(
        } else if ( !strcmp( mi[ i ].mi_type, T_NEWSUPSTR )) {
                if( state & GOT_NEWSUP ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: multiple newsuperior arg \"%s\"\n",
                        mi[ i ].mi_val ));
 #else
@@ -532,7 +532,7 @@ op_ldap_modrdn(
 
        } else {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: bad type \"%s\"\n",
                        mi[ i ].mi_type ));
 #else
@@ -549,7 +549,7 @@ op_ldap_modrdn(
      */
     if ( !GOT_ALL_MODDN(state) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "op_ldap_modrdn: Error: missing arguments\n" ));
 #else
        Debug( LDAP_DEBUG_ANY, "Error: op_ldap_modrdn: missing arguments\n",
@@ -571,7 +571,7 @@ op_ldap_modrdn(
        snprintf( buf2, buf2len, "(\"%s\" -> \"%s\")", re->re_dn, mi->mi_val );
 
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "op_ldap_modrdn: replica %s - modify rdn %s (flag: %d)\n",
                buf, buf2, drdnflag ));
 #else
@@ -712,7 +712,7 @@ do_unbind(
        rc = ldap_unbind( ri->ri_ldp );
        if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "do_unbind: ldap_unbind failed for %s:%d: %s\n",
                    ri->ri_hostname, ri->ri_port, ldap_err2string( rc ) ));
 #else
@@ -751,7 +751,7 @@ do_bind(
 
     if ( ri == NULL ) {
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: null ri ptr\n" ));
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: null ri ptr\n" ));
 #else
        Debug( LDAP_DEBUG_ANY, "Error: do_bind: null ri ptr\n", 0, 0, 0 );
 #endif
@@ -762,7 +762,7 @@ do_bind(
        ldrc = ldap_unbind( ri->ri_ldp );
        if ( ldrc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "do_bind: ldap_unbind failed: %s\n", ldap_err2string( ldrc ) ));
 #else
            Debug( LDAP_DEBUG_ANY,
@@ -774,7 +774,7 @@ do_bind(
     }
 
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "do_bind: Initializing session to %s:%d\n", 
            ri->ri_hostname, ri->ri_port ));
 #else
@@ -785,7 +785,7 @@ do_bind(
     ri->ri_ldp = ldap_init( ri->ri_hostname, ri->ri_port );
     if ( ri->ri_ldp == NULL ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, 
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, 
                        "do_bind: ldap_init (%s, %d) failed: %s\n",
                        ri->ri_hostname, ri->ri_port, sys_errlist[ errno ] ));
 #else
@@ -802,7 +802,7 @@ do_bind(
 
                if( err != LDAP_OPT_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: ",
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
                                "Error: ldap_set_option(%s, LDAP_OPT_VERSION, 3) failed!\n",
                                ri->ri_hostname ));
 #else
@@ -827,7 +827,7 @@ do_bind(
 
                if( err != LDAP_OPT_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: ",
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
                                "Error: ldap_set_option(%s, REFERRALS, OFF) failed!\n",
                                ri->ri_hostname ));
 #else
@@ -848,7 +848,7 @@ do_bind(
 
                if( err != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: ",
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: ",
                                "%s: ldap_start_tls failed: %s (%d)\n",
                                ri->ri_tls == TLS_CRITICAL ? "Error" : "Warning",
                                ldap_err2string( err ), err ));
@@ -873,7 +873,7 @@ do_bind(
         * Bind with a plaintext password.
         */
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "do_bind: bind to %s:%d as %s (simple)\n", 
                ri->ri_hostname, ri->ri_port, ri->ri_bind_dn ));
 #else
@@ -884,7 +884,7 @@ do_bind(
                ri->ri_password );
        if ( ldrc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+               LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                    "Error: ldap_simple_bind_s for %s:%d failed: %s\n",
                    ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) ));
 #else
@@ -901,7 +901,7 @@ do_bind(
 
        case AUTH_SASL:
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ARGS, 
+       LDAP_LOG (( "operation", LDAP_LEVEL_ARGS, 
                "do_bind: bind to %s as %s via %s (SASL)\n", 
                ri->ri_hostname, ri->ri_authcId, ri->ri_saslmech ));
 #else
@@ -917,7 +917,7 @@ do_bind(
 
                if( err != LDAP_OPT_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                                "Error: ldap_set_option(%s,SECPROPS,\"%s\") failed!\n",
                                ri->ri_hostname, ri->ri_secprops ));
 #else
@@ -941,7 +941,7 @@ do_bind(
                    LDAP_SASL_QUIET, lutil_sasl_interact, defaults );
                if ( ldrc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                                "Error: LDAP SASL for %s:%d failed: %s\n",
                            ri->ri_hostname, ri->ri_port, ldap_err2string( ldrc ) ));
 #else
@@ -960,7 +960,7 @@ do_bind(
        break;
 #else
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                "Error: do_bind: SASL not supported %s:%d\n",
                 ri->ri_hostname, ri->ri_port ));
 #else
@@ -975,7 +975,7 @@ do_bind(
 
     default:
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                "Error: do_bind: unknown auth type \"%d\" for %s:%d\n",
                ri->ri_bind_method, ri->ri_hostname, ri->ri_port ));
 #else
@@ -1004,7 +1004,7 @@ do_bind(
 
                if( err != LDAP_OPT_SUCCESS ) {
 #ifdef NEW_LOGGING
-                       LDAP_LOG (( "ldap_op", LDAP_LEVEL_ERR, "do_bind: "
+                       LDAP_LOG (( "operation", LDAP_LEVEL_ERR, "do_bind: "
                                "ldap_set_option(%s, SERVER_CONTROLS, ManageDSAit) failed!\n",
                                ri->ri_hostname ));
 #else
@@ -1041,13 +1041,13 @@ dump_ldm_array(
     for ( i = 0; ldmarr[ i ] != NULL; i++ ) {
        ldm = ldmarr[ i ];
 #ifdef NEW_LOGGING
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_INFO, "dump_ldm_array: "
+       LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
                "Trace (%ld): *** ldmarr[ %d ] contents:\n",
                (long) getpid(), i ));
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_INFO, "dump_ldm_array: "
+       LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
                "Trace (%ld): *** ldm->mod_op: %d\n",
                (long) getpid(), ldm->mod_op ));
-       LDAP_LOG (( "ldap_op", LDAP_LEVEL_INFO, "dump_ldm_array: "
+       LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
                "Trace (%ld): *** ldm->mod_type: %s\n",
                (long) getpid(), ldm->mod_type ));
 #else
@@ -1067,7 +1067,7 @@ dump_ldm_array(
                sprintf( msgbuf, "***** bv[ %d ] len = %ld, val = <%s>",
                        j, b->bv_len, b->bv_val );
 #ifdef NEW_LOGGING
-               LDAP_LOG (( "ldap_op", LDAP_LEVEL_INFO, "dump_ldm_array: "
+               LDAP_LOG (( "operation", LDAP_LEVEL_INFO, "dump_ldm_array: "
                        "Trace (%ld):%s\n", (long) getpid(), msgbuf ));
 #else
                Debug( LDAP_DEBUG_TRACE,