Improve logging

This commit is contained in:
Ondřej Kuzník 2017-05-18 16:48:12 +01:00 committed by Ondřej Kuzník
parent 3f5dee0b79
commit 26f721510a
4 changed files with 11 additions and 5 deletions

View file

@ -317,7 +317,8 @@ client_bind( Connection *client, Operation *op )
upstream = backend_select( op );
if ( !upstream ) {
Debug( LDAP_DEBUG_STATS, "client_bind: "
"no available connection found\n" );
"connid=%lu, msgid=%d no available connection found\n",
op->o_client_connid, op->o_client_msgid );
operation_send_reject(
op, LDAP_UNAVAILABLE, "no connections available", 1 );
CONNECTION_LOCK_DECREF(client);

View file

@ -182,6 +182,9 @@ handle_one_request( Connection *c )
case LDAP_REQ_UNBIND:
/* There is never a response for this operation */
operation_destroy_from_client( op );
Debug( LDAP_DEBUG_STATS, "handle_one_request: "
"received unbind, closing client connid=%lu\n",
c->c_connid );
CLIENT_DESTROY(c);
return -1;
case LDAP_REQ_BIND:
@ -316,7 +319,7 @@ client_destroy( Connection *c )
enum sc_state state;
Debug( LDAP_DEBUG_CONNS, "client_destroy: "
"destroying client %lu\n",
"destroying client connid=%lu\n",
c->c_connid );
assert( c->c_state != SLAP_C_INVALID );

View file

@ -431,7 +431,7 @@ operation_init( Connection *c, BerElement *ber )
}
Debug( LDAP_DEBUG_TRACE, "operation_init: "
"set up a new operation, %s with msgid=%d for client %lu\n",
"set up a new operation, %s with msgid=%d for client connid=%lu\n",
slap_msgtype2str( op->o_tag ), op->o_client_msgid,
op->o_client_connid );
@ -624,7 +624,8 @@ request_process( Connection *client, Operation *op )
upstream = backend_select( op );
if ( !upstream ) {
Debug( LDAP_DEBUG_STATS, "request_process: "
"no available connection found\n" );
"connid=%lu, msgid=%d no available connection found\n",
op->o_client_connid, op->o_client_msgid );
goto fail;
}
op->o_upstream = upstream;

View file

@ -369,7 +369,8 @@ handle_one_response( Connection *c )
}
if ( op ) {
Debug( LDAP_DEBUG_TRACE, "handle_one_response: "
"upstream=%lu, processing response for client %lu, msgid=%d\n",
"upstream=%lu, processing response for client connid=%lu, "
"msgid=%d\n",
c->c_connid, op->o_client_connid, op->o_client_msgid );
} else {
tag = ber_peek_tag( ber, &len );