activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: for mkahadb populate mdc activemq.persistenceDir such that logging for a particular instance can be identified and correlated
Date Mon, 04 Jul 2016 10:20:35 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 73a8d7dd6 -> 4386750fd


for mkahadb populate mdc activemq.persistenceDir such that logging for a particular instance
can be identified and correlated


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

Branch: refs/heads/master
Commit: 4386750fdb6938bd36669b5c8168aef8d772041e
Parents: 73a8d7d
Author: gtully <gary.tully@gmail.com>
Authored: Mon Jul 4 11:19:44 2016 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Mon Jul 4 11:19:56 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/store/kahadb/MessageDatabase.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4386750f/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index e3918ab..3ffe55f 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -112,6 +112,7 @@ import org.apache.activemq.util.ServiceSupport;
 import org.apache.activemq.util.ThreadPoolUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 public abstract class MessageDatabase extends ServiceSupport implements BrokerServiceAware
{
 
@@ -1646,6 +1647,7 @@ public abstract class MessageDatabase extends ServiceSupport implements
BrokerSe
      * @throws IOException
      */
     void checkpointUpdate(Transaction tx, boolean cleanup) throws IOException {
+        MDC.put("activemq.persistenceDir", getDirectory().getName());
         LOG.debug("Checkpoint started.");
 
         // reflect last update exclusive of current checkpoint
@@ -1877,6 +1879,7 @@ public abstract class MessageDatabase extends ServiceSupport implements
BrokerSe
                 journalLogOnLastCompactionCheck = journal.getCurrentDataFileId();
             }
         }
+        MDC.remove("activemq.persistenceDir");
 
         LOG.debug("Checkpoint done.");
     }


Mime
View raw message