qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1068719 - in /qpid/trunk/qpid/cpp/src/qmf: Agent.cpp AgentSession.cpp ConsoleSession.cpp
Date Wed, 09 Feb 2011 01:10:51 GMT
Author: tross
Date: Wed Feb  9 01:10:51 2011
New Revision: 1068719

URL: http://svn.apache.org/viewvc?rev=1068719&view=rev
Log:
QPID-3046 - Improved detail in trace log messages.

Modified:
    qpid/trunk/qpid/cpp/src/qmf/Agent.cpp
    qpid/trunk/qpid/cpp/src/qmf/AgentSession.cpp
    qpid/trunk/qpid/cpp/src/qmf/ConsoleSession.cpp

Modified: qpid/trunk/qpid/cpp/src/qmf/Agent.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/Agent.cpp?rev=1068719&r1=1068718&r2=1068719&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/Agent.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/Agent.cpp Wed Feb  9 01:10:51 2011
@@ -339,7 +339,7 @@ void AgentImpl::handleMethodResponse(con
     uint32_t correlator;
     boost::shared_ptr<SyncContext> context;
 
-    QPID_LOG(trace, "RCVD MethodResponse map=" << response);
+    QPID_LOG(trace, "RCVD MethodResponse cid=" << cid << " map=" << response);
 
     aIter = response.find("_arguments");
     if (aIter != response.end())
@@ -559,10 +559,10 @@ void AgentImpl::sendQuery(const Query& q
     if (!session.authUser.empty())
         msg.setUserId(session.authUser);
     encode(QueryImplAccess::get(query).asMap(), msg);
-    if (sender.isValid())
+    if (sender.isValid()) {
         sender.send(msg);
-
-    QPID_LOG(trace, "SENT QueryRequest to=" << name);
+        QPID_LOG(trace, "SENT QueryRequest to=" << sender.getName() << "/" <<
directSubject << " cid=" << correlator);
+    }
 }
 
 
@@ -586,10 +586,10 @@ void AgentImpl::sendMethod(const string&
     if (!session.authUser.empty())
         msg.setUserId(session.authUser);
     encode(map, msg);
-    if (sender.isValid())
+    if (sender.isValid()) {
         sender.send(msg);
-
-    QPID_LOG(trace, "SENT MethodRequest method=" << method << " to=" <<
name);
+        QPID_LOG(trace, "SENT MethodRequest method=" << method << " to=" <<
sender.getName() << "/" << directSubject << " content=" << map <<
" cid=" << correlator);
+    }
 }
 
 void AgentImpl::sendSchemaRequest(const SchemaId& id)
@@ -628,10 +628,10 @@ void AgentImpl::sendSchemaRequest(const 
     msg.setSubject(directSubject);
     if (!session.authUser.empty())
         msg.setUserId(session.authUser);
-    if (sender.isValid())
+    if (sender.isValid()) {
         sender.send(msg);
-
-    QPID_LOG(trace, "SENT V1SchemaRequest to=" << name);
+        QPID_LOG(trace, "SENT V1SchemaRequest to=" << sender.getName() << "/"
<< directSubject);
+    }
 }
 
 

Modified: qpid/trunk/qpid/cpp/src/qmf/AgentSession.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/AgentSession.cpp?rev=1068719&r1=1068718&r2=1068719&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/AgentSession.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/AgentSession.cpp Wed Feb  9 01:10:51 2011
@@ -571,7 +571,7 @@ void AgentSessionImpl::raiseEvent(const 
     encode(list, msg);
     topicSender.send(msg);
 
-    QPID_LOG(trace, "SENT EventIndication to=" << subject);
+    QPID_LOG(trace, "SENT EventIndication to=" << topicSender.getName() << "/"
<< subject);
 }
 
 
@@ -625,7 +625,7 @@ void AgentSessionImpl::setAgentName()
 
 void AgentSessionImpl::handleLocateRequest(const Variant::List& predicate, const Message&
msg)
 {
-    QPID_LOG(trace, "RCVD AgentLocateRequest");
+    QPID_LOG(trace, "RCVD AgentLocateRequest from=" << msg.getReplyTo());
 
     if (!predicate.empty()) {
         Query agentQuery(QUERY_OBJECT);
@@ -659,7 +659,7 @@ void AgentSessionImpl::handleLocateReque
 
 void AgentSessionImpl::handleMethodRequest(const Variant::Map& content, const Message&
msg)
 {
-    QPID_LOG(trace, "RCVD MethodRequest map=" << content << " from=" <<
msg.getReplyTo());
+    QPID_LOG(trace, "RCVD MethodRequest map=" << content << " from=" <<
msg.getReplyTo() << " cid=" << msg.getCorrelationId());
 
     //
     // Construct an AgentEvent to be sent to the application.
@@ -719,7 +719,7 @@ void AgentSessionImpl::handleMethodReque
 
 void AgentSessionImpl::handleQueryRequest(const Variant::Map& content, const Message&
msg)
 {
-    QPID_LOG(trace, "RCVD QueryRequest query=" << content << " from=" <<
msg.getReplyTo());
+    QPID_LOG(trace, "RCVD QueryRequest query=" << content << " from=" <<
msg.getReplyTo() << " cid=" << msg.getCorrelationId());
 
     //
     // Construct an AgentEvent to be sent to the application or directly handled by the agent.

Modified: qpid/trunk/qpid/cpp/src/qmf/ConsoleSession.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qmf/ConsoleSession.cpp?rev=1068719&r1=1068718&r2=1068719&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qmf/ConsoleSession.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qmf/ConsoleSession.cpp Wed Feb  9 01:10:51 2011
@@ -394,6 +394,7 @@ void ConsoleSessionImpl::sendAgentLocate
 {
     Message msg;
     Variant::Map& headers(msg.getProperties());
+    static const string subject("console.request.agent_locate");
 
     headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_REQUEST;
     headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_AGENT_LOCATE_REQUEST;
@@ -401,12 +402,12 @@ void ConsoleSessionImpl::sendAgentLocate
 
     msg.setReplyTo(replyAddress);
     msg.setCorrelationId("agent-locate");
-    msg.setSubject("console.request.agent_locate");
+    msg.setSubject(subject);
     encode(agentQuery.getPredicate(), msg);
 
     topicSender.send(msg);
 
-    QPID_LOG(trace, "SENT AgentLocate to topic");
+    QPID_LOG(trace, "SENT AgentLocate to=" << topicSender.getName() << "/" <<
subject);
 }
 
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message