From: Julius Enarusai Date: Thu, 25 Apr 2002 22:12:44 +0000 (+0000) Subject: ITS#1730: Misc typos in NEW_LOGGING code from Hallvard X-Git-Tag: OPENLDAP_REL_ENG_2_MP~146 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ed8f299245aadab8bc1be0ab007702e157673750;p=openldap ITS#1730: Misc typos in NEW_LOGGING code from Hallvard --- diff --git a/servers/slapd/back-meta/bind.c b/servers/slapd/back-meta/bind.c index 1850679628..808bb68909 100644 --- a/servers/slapd/back-meta/bind.c +++ b/servers/slapd/back-meta/bind.c @@ -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", diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index e855ae1c54..692efd2d71 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -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, diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 94bd2f5dac..e79dcc6252 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -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 diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 38324be6ea..37a59aa1ea 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -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 ); diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index baa1f0fce2..66145f59e5 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -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,