From 30e538e83637c9851f8575783d4173cdc42638ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 27 Jun 2017 16:35:21 +0100 Subject: [PATCH] Realign logging levels. Stats now logs all operations, stats2 additionally intermediate messages (search entries). --- servers/lloadd/connection.c | 4 ++-- servers/lloadd/operation.c | 5 +++-- servers/lloadd/upstream.c | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/servers/lloadd/connection.c b/servers/lloadd/connection.c index e7b81b7607..80cb6b166a 100644 --- a/servers/lloadd/connection.c +++ b/servers/lloadd/connection.c @@ -158,8 +158,8 @@ connection_init( ber_socket_t s, const char *peername, int flags ) connection_assign_nextid( c ); Debug( LDAP_DEBUG_CONNS, "connection_init: " - "connection connid=%lu allocated for socket fd=%d\n", - c->c_connid, s ); + "connection connid=%lu allocated for socket fd=%d peername=%s\n", + c->c_connid, s, peername ); CONNECTION_LOCK(c); c->c_state = SLAP_C_ACTIVE; diff --git a/servers/lloadd/operation.c b/servers/lloadd/operation.c index 5f2f66e9a2..14bd2e23cf 100644 --- a/servers/lloadd/operation.c +++ b/servers/lloadd/operation.c @@ -455,8 +455,9 @@ operation_init( Connection *c, BerElement *ber ) ber_skip_element( ber, &op->o_ctrls ); } - Debug( LDAP_DEBUG_TRACE, "operation_init: " - "set up a new operation, %s with msgid=%d for client connid=%lu\n", + Debug( LDAP_DEBUG_STATS, "operation_init: " + "received 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 ); diff --git a/servers/lloadd/upstream.c b/servers/lloadd/upstream.c index 7cbbeb7ec3..67e48234fe 100644 --- a/servers/lloadd/upstream.c +++ b/servers/lloadd/upstream.c @@ -40,7 +40,7 @@ forward_response( Operation *op, BerElement *ber ) ber_skip_element( ber, &controls ); } - Debug( LDAP_DEBUG_CONNS, "forward_response: " + Debug( LDAP_DEBUG_TRACE, "forward_response: " "%s to client connid=%lu request msgid=%d\n", slap_msgtype2str( response_tag ), op->o_client_connid, op->o_client_msgid ); @@ -71,7 +71,7 @@ forward_final_response( Operation *op, BerElement *ber ) { int rc; - Debug( LDAP_DEBUG_CONNS, "forward_final_response: " + Debug( LDAP_DEBUG_STATS, "forward_final_response: " "connid=%lu msgid=%d finishing up with a request for " "client connid=%lu\n", op->o_upstream_connid, op->o_upstream_msgid, op->o_client_connid ); @@ -111,10 +111,10 @@ handle_bind_response( Operation *op, BerElement *ber ) goto done; } - Debug( LDAP_DEBUG_CONNS, "handle_bind_response: " - "received response for bind request by client connid=%lu, " - "result=%d\n", - op->o_client_connid, result ); + Debug( LDAP_DEBUG_STATS, "handle_bind_response: " + "received response for bind request msgid=%d by client " + "connid=%lu, result=%d\n", + op->o_client_msgid, op->o_client_connid, result ); CONNECTION_LOCK(upstream); if ( result != LDAP_SASL_BIND_IN_PROGRESS ) { @@ -188,12 +188,12 @@ handle_vc_bind_response( Operation *op, BerElement *ber ) CONNECTION_UNLOCK(upstream); } - CONNECTION_LOCK(c); + Debug( LDAP_DEBUG_STATS, "handle_vc_bind_response: " + "received response for bind request msgid=%d by client " + "connid=%lu, result=%d\n", + op->o_client_msgid, op->o_client_connid, result ); - Debug( LDAP_DEBUG_CONNS, "handle_vc_bind_response: " - "received response for bind request by client connid=%lu, " - "result=%d\n", - c->c_connid, result ); + CONNECTION_LOCK(c); if ( tag == LDAP_TAG_EXOP_VERIFY_CREDENTIALS_COOKIE ) { if ( !BER_BVISNULL( &c->c_vc_cookie ) ) { @@ -386,7 +386,7 @@ handle_one_response( Connection *c ) } } if ( op ) { - Debug( LDAP_DEBUG_TRACE, "handle_one_response: " + Debug( LDAP_DEBUG_STATS2, "handle_one_response: " "upstream connid=%lu, processing response for " "client connid=%lu, msgid=%d\n", c->c_connid, op->o_client_connid, op->o_client_msgid );