qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1647403 - in /qpid/dispatch/trunk: python/qpid_dispatch_internal/management/agent.py src/message.c
Date Mon, 22 Dec 2014 21:07:49 GMT
Author: aconway
Date: Mon Dec 22 21:07:49 2014
New Revision: 1647403

URL: http://svn.apache.org/r1647403
Log:
Logging improvements

Modified:
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py
    qpid/dispatch/trunk/src/message.c

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py?rev=1647403&r1=1647402&r2=1647403&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/agent.py Mon Dec 22 21:07:49
2014
@@ -53,7 +53,7 @@ from itertools import ifilter, chain
 from traceback import format_exc
 from threading import Lock
 from ctypes import c_void_p, py_object, c_long
-from dispatch import IoAdapter, LogAdapter, LOG_DEBUG, LOG_ERROR
+from dispatch import IoAdapter, LogAdapter, LOG_INFO, LOG_DEBUG, LOG_ERROR
 from qpid_dispatch.management.error import ManagementError, OK, CREATED, NO_CONTENT, STATUS_TEXT,
\
     BadRequestStatus, InternalServerErrorStatus, NotImplementedStatus, NotFoundStatus
 from qpid_dispatch.management.entity import camelcase
@@ -372,6 +372,8 @@ class Agent(object):
 
     def activate(self, address):
         """Register the management address to receive management requests"""
+        self.entities.refresh_from_c()
+        self.log(LOG_INFO, "Activating management agent on %s" % address)
         self.io = [IoAdapter(self.receive, address),
                    IoAdapter(self.receive, address, True)] # Global
 

Modified: qpid/dispatch/trunk/src/message.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/message.c?rev=1647403&r1=1647402&r2=1647403&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/message.c (original)
+++ qpid/dispatch/trunk/src/message.c Mon Dec 22 21:07:49 2014
@@ -103,7 +103,7 @@ char* qd_message_repr(qd_message_t *msg,
     qd_message_check(msg, QD_DEPTH_BODY);
     char *begin = buffer;
     char *end = buffer + len - sizeof(REPR_END); /* Save space for ending */
-    aprintf(&begin, end, "Message(%p){", msg);
+    aprintf(&begin, end, "Message{", msg);
     copy_field(msg, QD_FIELD_TO, INT_MAX, "to='", "'", &begin, end);
     copy_field(msg, QD_FIELD_REPLY_TO, INT_MAX, " reply-to='", "'", &begin, end);
     copy_field(msg, QD_FIELD_BODY, 16, " body='", "'", &begin, end);
@@ -648,7 +648,7 @@ qd_message_t *qd_message_receive(qd_deli
             qd_delivery_set_context(delivery, 0);
 
             char repr[qd_message_repr_len()];
-            qd_log(log_source, QD_LOG_TRACE, "%s received, link=%s",
+            qd_log(log_source, QD_LOG_TRACE, "Received %s on link %s",
                    qd_message_repr((qd_message_t*)msg, repr, sizeof(repr)),
                    pn_link_name(link));
 
@@ -699,7 +699,7 @@ void qd_message_send(qd_message_t *in_ms
     pn_link_t            *pnl     = qd_link_pn(link);
 
     char repr[qd_message_repr_len()];
-    qd_log(log_source, QD_LOG_TRACE, "%s sending, link=%s",
+    qd_log(log_source, QD_LOG_TRACE, "Sending %s on link %s",
            qd_message_repr(in_msg, repr, sizeof(repr)),
            pn_link_name(pnl));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message