- Statslog( LDAP_DEBUG_STATS, "%s BIND dn=\"%s\" method=%ld\n",
- op->o_log_prefix, op->o_req_dn.bv_val,
- (unsigned long) op->orb_method, 0, 0 );
+ if ( StatslogTest( LDAP_DEBUG_STATS )) {
+ sl += sprintf( sl, " BIND dn=\"%s\" method=%ld\n",
+ op->o_req_dn.bv_val, (unsigned long) op->orb_method );
+ if ( ldap_debug & LDAP_DEBUG_STATS )
+ lutil_debug( ldap_debug, LDAP_DEBUG_STATS, "%s", op->o_log_prefix );
+ if ( ldap_syslog & LDAP_DEBUG_STATS )
+ sendlog( op->o_logbuf, sl - op->o_logbuf );
+ sl = op->o_logptr;
+ *sl = '\0';
+ }