You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2013/10/25 19:07:21 UTC
git commit: Optimized debug log in TopicPublisher.publish() method
Updated Branches:
refs/heads/master fb65f4225 -> 374cbb1a4
Optimized debug log in TopicPublisher.publish() method
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/374cbb1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/374cbb1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/374cbb1a
Branch: refs/heads/master
Commit: 374cbb1a4aaada6939fb770c3f04857af404c2f2
Parents: fb65f42
Author: Imesh Gunaratne <im...@apache.org>
Authored: Fri Oct 25 22:37:09 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Fri Oct 25 22:37:09 2013 +0530
----------------------------------------------------------------------
.../stratos/messaging/broker/publish/TopicPublisher.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/374cbb1a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java
index 536185c..8dcb742 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/publish/TopicPublisher.java
@@ -71,9 +71,6 @@ public class TopicPublisher extends MessagePublisher {
Gson gson = new Gson();
String message = gson.toJson(messageObj);
- if (log.isDebugEnabled()) {
- log.debug("Message to the topic: " + message);
- }
try {
doPublish(message, headers);
@@ -110,6 +107,9 @@ public class TopicPublisher extends MessagePublisher {
}
topicPublisher.publish(textMessage);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Message published: %s %s", headers.toString(), message));
+ }
}
private void setPublisher() throws Exception, JMSException {