]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Realign logging levels.
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 27 Jun 2017 15:35:21 +0000 (16:35 +0100)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:55:46 +0000 (17:55 +0000)
Stats now logs all operations, stats2 additionally intermediate messages
(search entries).

servers/lloadd/connection.c
servers/lloadd/operation.c
servers/lloadd/upstream.c

index e7b81b7607f3ca459201cab30e42f2437ef5c5a1..80cb6b166ac35a440634c2d8bdc2c2839227b627 100644 (file)
@@ -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;
index 5f2f66e9a27dd5be15269dc5f1d18121a8a5380f..14bd2e23cf3bf1f78da6922f6962db53a5caf764 100644 (file)
@@ -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 );
 
index 7cbbeb7ec383a54d4c64327fc041423872a3b911..67e48234feb8fd109294f4b91b9c45913f87fa95 100644 (file)
@@ -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 );