/* $OpenLDAP$ */
/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/*
}
#endif
- Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD dn=\"%s\"\n",
- op->o_connid, op->o_opid, dn.bv_val, 0, 0 );
+ if ( StatslogTest( LDAP_DEBUG_STATS ) ) {
+ char abuf[BUFSIZ/2], *ptr = abuf;
+ int len = 0;
+
+ Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD dn=\"%s\"\n",
+ op->o_connid, op->o_opid, dn.bv_val, 0, 0 );
+
+ for ( tmp = modlist; tmp != NULL; tmp = tmp->sml_next ) {
+ if (len + 1 + tmp->sml_type.bv_len > sizeof(abuf)) {
+ Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD attr=%s\n",
+ op->o_connid, op->o_opid, abuf, 0, 0 );
+ len = 0;
+ ptr = abuf;
+ }
+ if (len) {
+ *ptr++ = ' ';
+ len++;
+ }
+ ptr = lutil_strcopy(ptr, tmp->sml_type.bv_val);
+ len += tmp->sml_type.bv_len;
+ }
+ if (len) {
+ Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu MOD attr=%s\n",
+ op->o_connid, op->o_opid, abuf, 0, 0 );
+ }
+ }
manageDSAit = get_manageDSAit( op );
* FIXME: is this correct?
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_modify: modify preOps failed\n"));
+ LDAP_LOG( OPERATION, INFO, "do_modify: modify preOps "
+ "failed\n", 0, 0, 0 );
#else
- Debug (LDAP_DEBUG_TRACE, " modify preOps failed.\n", 0, 0, 0);
+ Debug(LDAP_DEBUG_TRACE, "do_modify: modify preOps failed.\n",
+ 0, 0, 0);
#endif
}
#endif /* defined( LDAP_SLAPI ) */
* FIXME: is this correct?
*/
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_INFO, "do_modify: modify postOps failed\n"));
+ LDAP_LOG( OPERATION, INFO, "do_modify: modify postOps "
+ "failed\n", 0, 0, 0 );
#else
- Debug (LDAP_DEBUG_TRACE, " modify postOps failed.\n", 0, 0, 0);
+ Debug(LDAP_DEBUG_TRACE, "do_modify: modify postOps "
+ "failed.\n", 0, 0, 0);
#endif
}
#endif /* defined( LDAP_SLAPI ) */