activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [1/2] activemq git commit: [no jira] add identity option to consumer bean to aid logging/debugging
Date Wed, 29 Mar 2017 22:51:07 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 8e00c6c2b -> d84a58656


[no jira] add identity option to consumer bean to aid logging/debugging


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/770a73e9
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/770a73e9
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/770a73e9

Branch: refs/heads/master
Commit: 770a73e9ba3b0c8e53332438de1747f4af4b7a86
Parents: 8e00c6c
Author: gtully <gary.tully@gmail.com>
Authored: Wed Mar 29 22:19:15 2017 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Wed Mar 29 22:19:15 2017 +0100

----------------------------------------------------------------------
 .../test/java/org/apache/activemq/spring/ConsumerBean.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/770a73e9/activemq-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java
index 40904f5..0d941f5 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java
@@ -30,6 +30,7 @@ public class ConsumerBean extends Assert implements MessageListener {
     private static final Logger LOG = LoggerFactory.getLogger(ConsumerBean.class);
     private final List<Message> messages = new ArrayList<Message>();
     private boolean verbose;
+    private String id = null;
 
     /**
      * Constructor.
@@ -37,6 +38,10 @@ public class ConsumerBean extends Assert implements MessageListener {
     public ConsumerBean() {
     }
 
+    public ConsumerBean(String id) {
+        this.id = id;
+    }
+
     /**
      * @return all the messages on the list so far, clearing the buffer
      */
@@ -59,7 +64,7 @@ public class ConsumerBean extends Assert implements MessageListener {
         synchronized (messages) {
             messages.add(message);
             if (verbose) {
-                LOG.info("Received: " + message);
+                LOG.info("" + id + "Received: " + message);
             }
             messages.notifyAll();
         }


Mime
View raw message