diff options
author | Ted Ross <tross@apache.org> | 2011-02-09 01:10:51 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2011-02-09 01:10:51 +0000 |
commit | 33edbe909fcbb4bd4b8beca378432aa651187da2 (patch) | |
tree | a85bd7a10dc490d44144b86f9d1c054695a689a9 | |
parent | b38e6b119c0b15050a3ba41d543ddbe17296f490 (diff) | |
download | qpid-python-33edbe909fcbb4bd4b8beca378432aa651187da2.tar.gz |
QPID-3046 - Improved detail in trace log messages.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1068719 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/src/qmf/Agent.cpp | 20 | ||||
-rw-r--r-- | cpp/src/qmf/AgentSession.cpp | 8 | ||||
-rw-r--r-- | cpp/src/qmf/ConsoleSession.cpp | 5 |
3 files changed, 17 insertions, 16 deletions
diff --git a/cpp/src/qmf/Agent.cpp b/cpp/src/qmf/Agent.cpp index 176cadf0c1..3843053905 100644 --- a/cpp/src/qmf/Agent.cpp +++ b/cpp/src/qmf/Agent.cpp @@ -339,7 +339,7 @@ void AgentImpl::handleMethodResponse(const Variant::Map& response, const Message 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& query, uint32_t correlator) 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& method, const Variant::Map& args, const 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 SchemaId& id) 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); + } } diff --git a/cpp/src/qmf/AgentSession.cpp b/cpp/src/qmf/AgentSession.cpp index 30176a8c01..4c5a72a467 100644 --- a/cpp/src/qmf/AgentSession.cpp +++ b/cpp/src/qmf/AgentSession.cpp @@ -571,7 +571,7 @@ void AgentSessionImpl::raiseEvent(const Data& data, int severity) 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::handleLocateRequest(const Variant::List& predicate, const 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::handleMethodRequest(const Variant::Map& content, const Me 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. diff --git a/cpp/src/qmf/ConsoleSession.cpp b/cpp/src/qmf/ConsoleSession.cpp index bb4458a0b9..f85b618891 100644 --- a/cpp/src/qmf/ConsoleSession.cpp +++ b/cpp/src/qmf/ConsoleSession.cpp @@ -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); } |