activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1084576 - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/broker/ activemq-core/src/main/java/org/apache/activemq/broker/region/ activemq-core/src/main/java/org/apache/activemq/transport/vm/ activemq-core/src/test/resou...
Date Wed, 23 Mar 2011 13:17:09 GMT
Author: dejanb
Date: Wed Mar 23 13:17:09 2011
New Revision: 1084576

URL: http://svn.apache.org/viewvc?rev=1084576&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3219 - add prefix to mdc keys

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
    activemq/trunk/activemq-core/src/test/resources/log4j.properties
    activemq/trunk/assembly/src/release/conf/log4j.properties

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Wed Mar 23 13:17:09 2011
@@ -474,7 +474,7 @@ public class BrokerService implements Se
             return;
         }
 
-        MDC.put("broker", brokerName);
+        MDC.put("activemq.broker", brokerName);
 
         try {
         	if (systemExitOnShutdown && useShutdownHook) {
@@ -543,7 +543,7 @@ public class BrokerService implements Se
             }
             throw e;
         } finally {
-            MDC.remove("broker");
+            MDC.remove("activemq.broker");
         }
     }
 
@@ -558,7 +558,7 @@ public class BrokerService implements Se
             return;
         }
 
-        MDC.put("broker", brokerName);
+        MDC.put("activemq.broker", brokerName);
 
         if (systemExitOnShutdown) {
         	new Thread() {
@@ -648,7 +648,7 @@ public class BrokerService implements Se
             }
         }
 
-        MDC.remove("broker");
+        MDC.remove("activemq.broker");
 
         stopper.throwFirstException();
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Wed Mar 23 13:17:09 2011
@@ -298,7 +298,7 @@ public class TransportConnection impleme
     }
 
     public Response service(Command command) {
-        MDC.put("connector", connector.getUri().toString());
+        MDC.put("activemq.connector", connector.getUri().toString());
         Response response = null;
         boolean responseRequired = command.isResponseRequired();
         int commandId = command.getCommandId();
@@ -330,7 +330,7 @@ public class TransportConnection impleme
             }
             context = null;
         }
-        MDC.remove("connector");
+        MDC.remove("activemq.connector");
         return response;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Wed Mar 23 13:17:09 2011
@@ -1364,7 +1364,7 @@ public class Queue extends BaseDestinati
      * @see org.apache.activemq.thread.Task#iterate()
      */
     public boolean iterate() {
-        MDC.put("destination", getName());
+        MDC.put("activemq.destination", getName());
         boolean pageInMoreMessages = false;
         synchronized (iteratingMutex) {
 
@@ -1481,7 +1481,7 @@ public class Queue extends BaseDestinati
             if (pendingWakeups.get() > 0) {
                 pendingWakeups.decrementAndGet();
             }
-            MDC.remove("destination");
+            MDC.remove("activemq.destination");
             return pendingWakeups.get() > 0;
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransportFactory.java
Wed Mar 23 13:17:09 2011
@@ -122,7 +122,7 @@ public class VMTransportFactory extends 
                             broker = BrokerFactory.createBroker(brokerURI);
                         }
                         broker.start();
-                        MDC.put("broker", broker.getBrokerName());
+                        MDC.put("activemq.broker", broker.getBrokerName());
                     } catch (URISyntaxException e) {
                         throw IOExceptionSupport.create(e);
                     }
@@ -232,7 +232,7 @@ public class VMTransportFactory extends 
             if (broker != null) {
                 ServiceSupport.dispose(broker);
             }
-            MDC.remove("broker");
+            MDC.remove("activemq.broker");
         }
     }
 

Modified: activemq/trunk/activemq-core/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/log4j.properties?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/log4j.properties (original)
+++ activemq/trunk/activemq-core/src/test/resources/log4j.properties Wed Mar 23 13:17:09 2011
@@ -31,12 +31,12 @@ log4j.rootLogger=INFO, out, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-#log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{broker}
%-20.20X{connector} %-10.10X{destination} - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker}
%-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n
 
 # File appender
 log4j.appender.out=org.apache.log4j.FileAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
 log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{broker}
%-20.20X{connector} %-10.10X{destination} - %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %-10.10X{activemq.broker}
%-20.20X{activemq.connector} %-10.10X{activemq.destination} - %m%n
 log4j.appender.out.file=target/activemq-test.log
 log4j.appender.out.append=true

Modified: activemq/trunk/assembly/src/release/conf/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/log4j.properties?rev=1084576&r1=1084575&r2=1084576&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/log4j.properties (original)
+++ activemq/trunk/assembly/src/release/conf/log4j.properties Wed Mar 23 13:17:09 2011
@@ -51,13 +51,13 @@ log4j.appender.logfile.layout=org.apache
 log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n
 # use some of the following patterns to see MDC logging data
 #
-# %X{broker}
-# %X{connector}
-# %X{destination}
+# %X{activemq.broker}
+# %X{activemq.connector}
+# %X{activemq.destination}
 #
 # e.g.
 #
-# log4j.appender.logfile.layout.ConversionPattern=%d | %-20.20X{connector} | %-5p | %m |
%c | %t%n
+# log4j.appender.logfile.layout.ConversionPattern=%d | %-20.20X{activemq.connector} | %-5p
| %m | %c | %t%n
 
 ###########
 # Audit log



Mime
View raw message