changed log levels
authort3sserakt <t3ss@posteo.de>
Wed, 8 Nov 2017 19:07:06 +0000 (20:07 +0100)
committert3sserakt <t3ss@posteo.de>
Wed, 8 Nov 2017 19:07:06 +0000 (20:07 +0100)
src/social/social_api.c
src/util/client.c
src/util/mq.c

index 1db8e501ac0b51e4d94b3b73e0fc4e09b70d5818..f9d00d491697160ca8f0230be9f0e83c6d897cd6 100644 (file)
@@ -1063,7 +1063,7 @@ place_cleanup (struct GNUNET_SOCIAL_Place *plc)
   }
   if (NULL != plc->mq)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "destroying MQ (place_cleanup)\n");
     GNUNET_MQ_destroy (plc->mq);
     plc->mq = NULL;
@@ -1088,7 +1088,7 @@ place_disconnect (struct GNUNET_SOCIAL_Place *plc)
   GNUNET_CRYPTO_hash (&plc->pub_key,
                       sizeof (plc->pub_key),
                       &place_pub_hash);
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "place_disconnect, plc = %s\n",
               GNUNET_h2s (&place_pub_hash));
   place_cleanup (plc);
index a5eae2a75a57752cb8d74903aef06159128df5ca..19ab67f0adeb5bac75640b7f7cd518e0a27845ae 100644 (file)
@@ -261,19 +261,25 @@ transmit_ready (void *cls)
   pos = (const char *) cstate->msg;
   len = ntohs (cstate->msg->size);
   GNUNET_assert (cstate->msg_off < len);
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-              "client: message of type %u trying to send with socket %p\n", ntohs(cstate->msg->type), cstate->sock);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "client: message of type %u trying to send with socket %p (MQ: %p\n",
+              ntohs(cstate->msg->type),
+              cstate->sock,
+              cstate->mq);
+
  RETRY:
   ret = GNUNET_NETWORK_socket_send (cstate->sock,
                                     &pos[cstate->msg_off],
                                     len - cstate->msg_off);
   if (-1 == ret)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "client: error during sending message of type %u\n", ntohs(cstate->msg->type));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "client: error during sending message of type %u\n",
+                ntohs(cstate->msg->type));
     if (EINTR == errno){
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                  "client: retrying message of type %u\n", ntohs(cstate->msg->type));
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "client: retrying message of type %u\n",
+                  ntohs(cstate->msg->type));
       goto RETRY;
     }
     GNUNET_MQ_inject_error (cstate->mq,
@@ -284,8 +290,9 @@ transmit_ready (void *cls)
   cstate->msg_off += ret;
   if (cstate->msg_off < len)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "client: rescheduling message of type %u\n", ntohs(cstate->msg->type));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "client: rescheduling message of type %u\n",
+                ntohs(cstate->msg->type));
     cstate->send_task
       = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
                                         cstate->sock,
@@ -295,8 +302,9 @@ transmit_ready (void *cls)
       GNUNET_MQ_impl_send_in_flight (cstate->mq);
     return;
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-              "client: sending message of type %u successful\n", ntohs(cstate->msg->type));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "client: sending message of type %u successful\n",
+              ntohs(cstate->msg->type));
   cstate->msg = NULL;
   GNUNET_MQ_impl_send_continue (cstate->mq);
 }
@@ -385,8 +393,9 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq,
   if (NULL != cstate->retry_task)
     GNUNET_SCHEDULER_cancel (cstate->retry_task);
   if (NULL != cstate->sock){
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "client: destroying socket: %p\n", cstate->sock);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "client: destroying socket: %p\n",
+                cstate->sock);
     GNUNET_NETWORK_socket_close (cstate->sock);
   }
   cancel_aps (cstate);
@@ -528,8 +537,9 @@ try_unixpath (const char *service_name,
                                          SOCK_STREAM,
                                          0);
 
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
-                "client: socket created: %p\n", sock);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "client: socket created: %p\n",
+                sock);
 
     if ( (NULL != sock) &&
          ( (GNUNET_OK ==
@@ -815,8 +825,9 @@ connection_client_send_impl (struct GNUNET_MQ_Handle *mq,
   cstate->msg = msg;
   cstate->msg_off = 0;
   if (NULL == cstate->sock){
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "client: message of type %u waiting for socket\n",ntohs(msg->type));
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "client: message of type %u waiting for socket\n",
+                ntohs(msg->type));
     return; /* still waiting for connection */
    }
   cstate->send_task
index 6ad6b82eb21c2bf3030fa767a3b4ce427250ae48..793fd70aeccd2c870eba51919501e565bbe151fc 100644 (file)
@@ -360,7 +360,7 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
   GNUNET_assert (NULL == mq->envelope_head);
   mq->current_envelope = ev;
 
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "mq: sending message of type %u, queue empty\n",
               ntohs(ev->mh->type));
 
@@ -460,8 +460,9 @@ impl_send_continue (void *cls)
                               mq->envelope_tail,
                               mq->current_envelope);
 
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-              "mq: sending message of type %u from queue\n", ntohs(mq->current_envelope->mh->type));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "mq: sending message of type %u from queue\n",
+              ntohs(mq->current_envelope->mh->type));
 
   mq->send_impl (mq,
                 mq->current_envelope->mh,
@@ -946,8 +947,9 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev)
                                    mq->envelope_tail,
                                    mq->current_envelope);
 
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                  "mq: sending canceled message of type %u queue\n", ntohs(ev->mh->type));
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "mq: sending canceled message of type %u queue\n",
+                  ntohs(ev->mh->type));
 
       mq->send_impl (mq,
                     mq->current_envelope->mh,