You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/07/03 08:24:23 UTC

svn commit: r1688958 - in /qpid/java/trunk: ./ bdbstore/systests/ broker-core/src/main/java/org/apache/qpid/server/ broker-core/src/main/java/org/apache/qpid/server/configuration/updater/ broker-core/src/main/java/org/apache/qpid/server/logging/ broker...

Author: kwall
Date: Fri Jul  3 06:24:22 2015
New Revision: 1688958

URL: http://svn.apache.org/r1688958
Log:
QPID-6613: Use Logback's sift appender for per test log file

* Made some broker/common thread names more consise
* Broker now only starts/stops the Logback context iff it is not already started

Added:
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLogger.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLoggerImpl.java
    qpid/java/trunk/qpid-test-utils/src/main/resources/logback.xml
      - copied, changed from r1688862, qpid/java/trunk/test-profiles/test_resources/logback.xml
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
    qpid/java/trunk/systests/src/main/resources/
    qpid/java/trunk/systests/src/main/resources/logback-test.xml
Removed:
    qpid/java/trunk/broker/etc/logback.xml
    qpid/java/trunk/qpid-test-utils/src/main/resources/log4j-test.xml
    qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml
    qpid/java/trunk/test-profiles/test_resources/logback.xml
Modified:
    qpid/java/trunk/bdbstore/systests/pom.xml
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/Broker.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutorImpl.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
    qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java
    qpid/java/trunk/broker/bin/qpid-server.bat
    qpid/java/trunk/common/bin/qpid-run
    qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
    qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java
    qpid/java/trunk/pom.xml
    qpid/java/trunk/qpid-systests-parent/pom.xml
    qpid/java/trunk/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
    qpid/java/trunk/systests/etc/config-systests.json
    qpid/java/trunk/systests/pom.xml
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java
    qpid/java/trunk/test-profiles/JavaExcludes

Modified: qpid/java/trunk/bdbstore/systests/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/bdbstore/systests/pom.xml?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/bdbstore/systests/pom.xml (original)
+++ qpid/java/trunk/bdbstore/systests/pom.xml Fri Jul  3 06:24:22 2015
@@ -84,9 +84,6 @@
       <resource>
           <directory>src/main/resources</directory>
       </resource>
-      <resource>
-          <directory>${test.resource.directory}/test-profiles/test_resources</directory>
-      </resource>
     </resources>
 
     <plugins>

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/Broker.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/Broker.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/Broker.java (original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/Broker.java Fri Jul  3 06:24:22 2015
@@ -69,6 +69,7 @@ public class Broker
     private volatile SystemConfig _systemConfig;
 
     private final Action<Integer> _shutdownAction;
+    private boolean _loggerContextStarted;
 
 
     public Broker()
@@ -131,7 +132,10 @@ public class Broker
         if (_configuringOwnLogging)
         {
             LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
-            loggerContext.stop();
+            if (_loggerContextStarted)
+            {
+                loggerContext.stop();
+            }
         }
 
         if (_shutdownAction != null)
@@ -158,7 +162,11 @@ public class Broker
             {
                 ch.qos.logback.classic.Logger logger =
                         (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
-                logger.getLoggerContext().reset();
+                if (!logger.getLoggerContext().isStarted())
+                {
+                    logger.getLoggerContext().start();
+                    _loggerContextStarted = true;
+                }
                 logger.setAdditive(true);
                 logger.setLevel(Level.ALL);
 

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutorImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutorImpl.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutorImpl.java (original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutorImpl.java Fri Jul  3 06:24:22 2015
@@ -47,7 +47,7 @@ import org.apache.qpid.server.util.Serve
 
 public class TaskExecutorImpl implements TaskExecutor
 {
-    private static final String TASK_EXECUTION_THREAD_NAME = "Broker-Configuration-Thread";
+    private static final String TASK_EXECUTION_THREAD_NAME = "Broker-Config";
     private static final Logger LOGGER = LoggerFactory.getLogger(TaskExecutorImpl.class);
     private final PrincipalAccessor _principalAccessor;
 

Added: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLogger.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLogger.java?rev=1688958&view=auto
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLogger.java (added)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLogger.java Fri Jul  3 06:24:22 2015
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.logging;
+
+import java.util.Map;
+
+import org.apache.qpid.server.model.BrokerLogger;
+import org.apache.qpid.server.model.ManagedAttribute;
+import org.apache.qpid.server.model.ManagedObject;
+
+@ManagedObject( category = false, type = BrokerLogbackSocketLogger.TYPE,
+                description = "Logger implementation that writes log events to a remote logback server")
+public interface BrokerLogbackSocketLogger<X extends BrokerLogbackSocketLogger<X>> extends BrokerLogger<X>
+{
+    String TYPE = "BrokerLogbackSocket";
+    String PORT = "port";
+    String REMOTE_HOST = "remoteHost";
+    String RECONNECTION_DELAY = "reconnectionDelay";
+    String INCLUDE_CALLER_DATA = "includeCallerData";
+    String MAPPED_DIAGNOSTIC_CONTEXT = "mappedDiagnosticContext";
+
+    @ManagedAttribute(mandatory = true)
+    int getPort();
+
+    @ManagedAttribute(defaultValue = "localhost")
+    String getRemoteHost();
+
+    @ManagedAttribute(defaultValue = "100" )
+    long getReconnectionDelay();
+
+    @ManagedAttribute(defaultValue = "true")
+    boolean getIncludeCallerData();
+
+    @ManagedAttribute( defaultValue = "{}")
+    Map<String, String> getMappedDiagnosticContext();
+}

Added: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLoggerImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLoggerImpl.java?rev=1688958&view=auto
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLoggerImpl.java (added)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/logging/BrokerLogbackSocketLoggerImpl.java Fri Jul  3 06:24:22 2015
@@ -0,0 +1,115 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.logging;
+
+import java.util.Map;
+
+import ch.qos.logback.classic.net.SocketAppender;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.util.Duration;
+
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
+
+public class BrokerLogbackSocketLoggerImpl
+        extends AbstractBrokerLogger<BrokerLogbackSocketLoggerImpl> implements BrokerLogbackSocketLogger<BrokerLogbackSocketLoggerImpl>
+{
+    @ManagedAttributeField
+    private String _remoteHost;
+
+    @ManagedAttributeField
+    private long _reconnectionDelay;
+
+    @ManagedAttributeField
+    private int _port;
+
+    @ManagedAttributeField
+    private boolean _includeCallerData;
+
+    @ManagedAttributeField
+    private Map<String,String> _mappedDiagnosticContext;
+
+    @ManagedObjectFactoryConstructor
+    protected BrokerLogbackSocketLoggerImpl(final Map<String, Object> attributes, Broker<?> broker)
+    {
+        super(attributes, broker);
+    }
+
+    @Override
+    public String getRemoteHost()
+    {
+        return _remoteHost;
+    }
+
+    @Override
+    public int getPort()
+    {
+        return _port;
+    }
+
+    @Override
+    public long getReconnectionDelay()
+    {
+        return _reconnectionDelay;
+    }
+
+    @Override
+    public boolean getIncludeCallerData()
+    {
+        return _includeCallerData;
+    }
+
+    @Override
+    public Map<String, String> getMappedDiagnosticContext()
+    {
+        return _mappedDiagnosticContext;
+    }
+
+    @Override
+    protected Appender<ILoggingEvent> createAppenderInstance(Context loggerContext)
+    {
+        SocketAppender socketAppender = new SocketAppender()
+        {
+            @Override
+            protected void append(final ILoggingEvent event)
+            {
+                augmentWithMDC(event);
+                super.append(event);
+            }
+        };
+        socketAppender.setPort(_port);
+        socketAppender.setRemoteHost(_remoteHost);
+        socketAppender.setIncludeCallerData(_includeCallerData);
+        socketAppender.setReconnectionDelay(Duration.buildByMilliseconds(_reconnectionDelay));
+        return socketAppender;
+
+    }
+
+    private void augmentWithMDC(final ILoggingEvent event)
+    {
+        event.getMDCPropertyMap().putAll(_mappedDiagnosticContext);
+    }
+
+}

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java (original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java Fri Jul  3 06:24:22 2015
@@ -63,10 +63,10 @@ public class NetworkConnectionScheduler
     {
         try
         {
-            _selectorThread = new SelectorThread(this);
+            _name = name;
+            _selectorThread = new SelectorThread(this);  // TODO: Publishes partially constructed object
             _selectorThread.start();
             _poolSize = threadPoolSize;
-            _name = name;
             _executor = new ThreadPoolExecutor(_poolSize, _poolSize, 0L, TimeUnit.MILLISECONDS,
                                                new LinkedBlockingQueue<Runnable>(), factory);
             _executor.prestartAllCoreThreads();

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java (original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java Fri Jul  3 06:24:22 2015
@@ -60,7 +60,7 @@ class SelectorThread extends Thread
 
     SelectorThread(final NetworkConnectionScheduler scheduler) throws IOException
     {
-        super("SelectorThread-" + scheduler.getName());
+        super("Selector-" + scheduler.getName());
 
         _selector = Selector.open();
         _scheduler = scheduler;

Modified: qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java (original)
+++ qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java Fri Jul  3 06:24:22 2015
@@ -106,7 +106,7 @@ public abstract class AbstractVirtualHos
     {
         super(Collections.<Class<? extends ConfiguredObject>,ConfiguredObject<?>>singletonMap(Broker.class, parent),
               attributes);
-        _virtualHostExecutor = getTaskExecutor().getFactory().newInstance("VirtualHostNode-" + getName() + "-Configuration-Thread", new TaskExecutor.PrincipalAccessor()
+        _virtualHostExecutor = getTaskExecutor().getFactory().newInstance("VirtualHostNode-" + getName() + "-Config", new TaskExecutor.PrincipalAccessor()
         {
             @Override
             public Principal getPrincipal()

Modified: qpid/java/trunk/broker/bin/qpid-server.bat
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker/bin/qpid-server.bat?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/broker/bin/qpid-server.bat (original)
+++ qpid/java/trunk/broker/bin/qpid-server.bat Fri Jul  3 06:24:22 2015
@@ -67,7 +67,7 @@ if "%AMQJ_LOGGING_LEVEL%" == "" set AMQJ
 
 REM Set the default system properties that we'll use now that they have
 REM all been initialised
-set SYSTEM_PROPS=-Damqj.logging.level=%AMQJ_LOGGING_LEVEL% -DQPID_HOME="%QPID_HOME%" -DQPID_WORK="%QPID_WORK%"
+set SYSTEM_PROPS=-DQPID_HOME="%QPID_HOME%" -DQPID_WORK="%QPID_WORK%"
 
 if "%EXTERNAL_CLASSPATH%" == "" set EXTERNAL_CLASSPATH=%CLASSPATH%
 

Modified: qpid/java/trunk/common/bin/qpid-run
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/bin/qpid-run?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/common/bin/qpid-run (original)
+++ qpid/java/trunk/common/bin/qpid-run Fri Jul  3 06:24:22 2015
@@ -78,7 +78,6 @@ fi
 #Set the default system properties that we'll use now that they have
 #all been initialised
 declare -a SYSTEM_PROPS
-SYSTEM_PROPS[${#SYSTEM_PROPS[@]}]="-Damqj.logging.level=$AMQJ_LOGGING_LEVEL"
 SYSTEM_PROPS[${#SYSTEM_PROPS[@]}]="-DQPID_HOME=$QPID_HOME"
 SYSTEM_PROPS[${#SYSTEM_PROPS[@]}]="-DQPID_WORK=$QPID_WORK"
 

Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java Fri Jul  3 06:24:22 2015
@@ -78,7 +78,7 @@ final class IoReceiver implements Runnab
             throw new RuntimeException("Error creating IOReceiver thread",e);
         }
         receiverThread.setDaemon(true);
-        receiverThread.setName(String.format("IoReceiver-%s", socket.getRemoteSocketAddress()));
+        receiverThread.setName(String.format("IoRcvr-%s", socket.getRemoteSocketAddress()));
     }
 
     public void initiate()

Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java Fri Jul  3 06:24:22 2015
@@ -97,7 +97,7 @@ public final class IoSender implements R
         }
 
         senderThread.setDaemon(true);
-        senderThread.setName(String.format("IoSender-%s", _remoteSocketAddress));
+        senderThread.setName(String.format("IoSndr-%s", _remoteSocketAddress));
     }
 
     public void initiate()

Modified: qpid/java/trunk/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/pom.xml?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/pom.xml (original)
+++ qpid/java/trunk/pom.xml Fri Jul  3 06:24:22 2015
@@ -56,6 +56,8 @@
     <qpid.home>${basedir}</qpid.home> <!-- override for broker tests -->
     <qpid.home.qbtc.output>${qpid.home}${file.separator}target${file.separator}qbtc-test-config</qpid.home.qbtc.output> <!-- override for broker tests -->
     <qpid.work>${project.build.directory}${file.separator}QPID_WORK</qpid.work>
+    <!-- Directory used for per test log file output -->
+    <test.output.dir>${basedir}${file.separator}target${file.separator}surefire-reports</test.output.dir>
 
     <profile>java-mms.0-10</profile>
     <profile.broker.language>java</profile.broker.language>
@@ -72,6 +74,7 @@
     <profile.virtualhostnode.type>Memory</profile.virtualhostnode.type>
     <profile.broker.clean.between.tests>true</profile.broker.clean.between.tests>
     <profile.test_receive_timeout>1000</profile.test_receive_timeout>
+
     <dollar.sign>$</dollar.sign>
     <at.sign>@</at.sign>
     <bdb-version>5.0.104</bdb-version>
@@ -216,10 +219,7 @@
             <broker.config>${qpid.home}${file.separator}etc${file.separator}config-systests.json</broker.config>
             <max_prefetch>1000</max_prefetch>
             <qpid.dest_syntax>BURL</qpid.dest_syntax>
-            <amqj.logging.level>debug</amqj.logging.level>
-            <amqj.server.logging.level>debug</amqj.server.logging.level>
             <amqj.protocol.logging.level>debug</amqj.protocol.logging.level>
-            <root.logging.level>warn</root.logging.level>
             <test.port>15672</test.port>
             <test.mport>18999</test.mport>
             <test.cport>19099</test.cport>
@@ -250,6 +250,7 @@
 
             <!-- This must be a child of qpid home currently due to the horrible mechanics of QBTC  -->
             <test.output>${qpid.home.qbtc.output}</test.output>
+            <test.output.dir>${test.output.dir}</test.output.dir>
             <broker.clean.between.tests>true</broker.clean.between.tests>
             <qpid.test_receive_timeout>${profile.test_receive_timeout}</qpid.test_receive_timeout>
           </systemPropertyVariables>

Modified: qpid/java/trunk/qpid-systests-parent/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/qpid-systests-parent/pom.xml?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/qpid-systests-parent/pom.xml (original)
+++ qpid/java/trunk/qpid-systests-parent/pom.xml Fri Jul  3 06:24:22 2015
@@ -35,7 +35,6 @@
     <!-- test properties -->
     <qpid.home>${basedir}${file.separator}${broker.home.dir}</qpid.home>
     <qpid.home.qbtc.output>${qpid.home}${file.separator}qbtc-test-config</qpid.home.qbtc.output>
-    <test.output.dir>${basedir}${file.separator}target${file.separator}surefire-reports</test.output.dir>
 
     <test.working.directory>${basedir}/..</test.working.directory>
     <test.resource.directory>${basedir}/..</test.resource.directory>

Modified: qpid/java/trunk/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/java/trunk/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Fri Jul  3 06:24:22 2015
@@ -30,6 +30,7 @@ import junit.framework.TestCase;
 import junit.framework.TestResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 public class QpidTestCase extends TestCase
 {
@@ -38,19 +39,19 @@ public class QpidTestCase extends TestCa
     private static final String TEST_EXCLUDEFILES = "test.excludefiles";
     private static final String VIRTUAL_HOST_NODE_TYPE = "virtualhostnode.type";
     private static final String VIRTUAL_HOST_NODE_CONTEXT_BLUEPRINT = "virtualhostnode.context.blueprint";
+
     public static final String QPID_HOME = System.getProperty("QPID_HOME");
-    public static final String TEST_RESOURCES_DIR = QPID_HOME + "/../test-profiles/test_resources/";
-    public static final String TEST_PROFILES_DIR = QPID_HOME + "/../test-profiles/";
+    public static final String TEST_PROFILES_DIR = QPID_HOME + File.separator + ".." + File.separator + "test-profiles" + File.separator;
+    public static final String TEST_RESOURCES_DIR = TEST_PROFILES_DIR + "test_resources/";
     public static final String TMP_FOLDER = System.getProperty("java.io.tmpdir");
+    public static final String CLASS_QUALIFIED_TEST_NAME = "classQualifiedTestName";
 
     private static final Logger _logger = LoggerFactory.getLogger(QpidTestCase.class);
     private static QpidTestCase _currentInstance;
 
-    private final Map<String, String> _propertiesSetForTest = new HashMap<String, String>();
-
-    private String _testName;
+    private final Map<String, String> _propertiesSetForTest = new HashMap<>();
 
-    private Set<Runnable> _tearDownRegistry = new HashSet<>();
+    private final Set<Runnable> _tearDownRegistry = new HashSet<>();
 
     /**
      * Some tests are excluded when the property test.excludes is set to true.
@@ -75,12 +76,12 @@ public class QpidTestCase extends TestCa
             {
                 for (String exclude : testExcludes.split("\\s+"))
                 {
-                    exclusionListURIs += TEST_PROFILES_DIR + "/" + exclude + ";";
+                    exclusionListURIs += TEST_PROFILES_DIR + File.separator + exclude + ";";
                 }
             }
 
-            List<String> exclusionList = new ArrayList<String>();
 
+            List<String> exclusionList = new ArrayList<>();
             for (String uri : exclusionListURIs.split(";\\s*"))
             {
                 File file = new File(uri);
@@ -120,11 +121,15 @@ public class QpidTestCase extends TestCa
                 }
             }
 
-            _exclusionList = exclusionList;
+            _exclusionList = Collections.unmodifiableList(exclusionList);
+        }
+        else
+        {
+            _exclusionList = Collections.emptyList();
         }
     }
 
-    private static List<String> _exclusionList;
+    private static final List<String> _exclusionList;
 
     public QpidTestCase()
     {
@@ -133,17 +138,27 @@ public class QpidTestCase extends TestCa
 
     public void run(TestResult testResult)
     {
-        _currentInstance = this;
-        if (_exclusionList != null && (_exclusionList.contains(getClass().getPackage().getName() + ".*") ||
-                                       _exclusionList.contains(getClass().getName() + "#*") ||
-                                       _exclusionList.contains(getClass().getName() + "#" + getName())))
+        try
         {
-            _logger.info("Test: " + getName() + " is excluded");
-            testResult.endTest(this);
+            _currentInstance = this;
+            MDC.put(CLASS_QUALIFIED_TEST_NAME, getClassQualifiedTestName());
+
+            if (_exclusionList.contains(getClass().getPackage().getName() + ".*") ||
+                _exclusionList.contains(getClass().getName() + "#*") ||
+                _exclusionList.contains(getClass().getName() + "#" + getName()))
+            {
+                _logger.info("Test: " + getName() + " is excluded");
+                testResult.endTest(this);
+            }
+            else
+            {
+                super.run(testResult);
+            }
         }
-        else
+        finally
         {
-            super.run(testResult);
+            _currentInstance = null;
+            MDC.remove(CLASS_QUALIFIED_TEST_NAME);
         }
     }
 
@@ -159,6 +174,16 @@ public class QpidTestCase extends TestCa
         return storeType != null ? storeType : "TestMemory";
     }
 
+    protected String getClassQualifiedTestName()
+    {
+        return getClass().getCanonicalName() + "-" + getName();
+    }
+
+    protected String getTestName()
+    {
+        return getClass().getSimpleName() + "." + getName();
+    }
+
     public String getTestProfileVirtualHostNodeBlueprint()
     {
         return System.getProperty(VIRTUAL_HOST_NODE_CONTEXT_BLUEPRINT);
@@ -243,27 +268,19 @@ public class QpidTestCase extends TestCa
         }
     }
 
-    protected void tearDown() throws java.lang.Exception
+    protected void setUp() throws Exception
+    {
+        _logger.info("========== start " + getTestName() + " ==========");
+    }
+
+    protected void tearDown() throws Exception
     {
-        _logger.info("========== tearDown " + _testName + " ==========");
+        _logger.info("========== tearDown " + getTestName() + " ==========");
         revertTestSystemProperties();
         for (Runnable runnable : _tearDownRegistry)
         {
             runnable.run();
         }
         _tearDownRegistry.clear();
-        _currentInstance = null;
-    }
-
-    protected void setUp() throws Exception
-    {
-        _currentInstance = this;
-        _testName = getClass().getSimpleName() + "." + getName();
-        _logger.info("========== start " + _testName + " ==========");
-    }
-
-    protected String getTestName()
-    {
-        return _testName;
     }
 }

Copied: qpid/java/trunk/qpid-test-utils/src/main/resources/logback.xml (from r1688862, qpid/java/trunk/test-profiles/test_resources/logback.xml)
URL: http://svn.apache.org/viewvc/qpid/java/trunk/qpid-test-utils/src/main/resources/logback.xml?p2=qpid/java/trunk/qpid-test-utils/src/main/resources/logback.xml&p1=qpid/java/trunk/test-profiles/test_resources/logback.xml&r1=1688862&r2=1688958&rev=1688958&view=diff
==============================================================================
--- qpid/java/trunk/test-profiles/test_resources/logback.xml (original)
+++ qpid/java/trunk/qpid-test-utils/src/main/resources/logback.xml Fri Jul  3 06:24:22 2015
@@ -16,22 +16,26 @@
   ~ KIND, either express or implied.  See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
+  ~
   -->
-<configuration scan="true" scanPeriod="10 seconds">
-    <appender name="TestAppender" class="ch.qos.logback.core.FileAppender">
-        <file>${test.output.dir}${file.separator}TEST-${qpid.testClass}${qpid.testMethod}.txt</file>
-        <append>false</append>
-        <encoder>
-            <immediateFlush>true</immediateFlush>
-            <pattern>%d %-5p [%t] \(%c{2}\) - %m%n</pattern>
-        </encoder>
-    </appender>
-
-    <logger name="org.apache.qpid" level="${amqj.logging.level}"/>
-    <logger name="qpid.message" level="INFO"/>
+<configuration debug="true">
 
+    <appender name="RootSiftAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
+        <discriminator>
+            <Key>classQualifiedTestName</Key>
+            <DefaultValue>testrun</DefaultValue>
+        </discriminator>
+        <sift>
+            <appender name="FILE-${classQualifiedTestName}" class="ch.qos.logback.core.FileAppender">
+                <File>${test.output.dir}${file.separator}TEST-${classQualifiedTestName}.txt</File>
+                <Append>False</Append>
+                <encoder>
+                    <pattern>%date %-5level [%thread] %logger{10} %msg%n</pattern>
+                </encoder>
+            </appender>
+        </sift>
+    </appender>
     <root level="debug">
-        <appender-ref ref="TestAppender"/>
+        <appender-ref ref="RootSiftAppender"/>
     </root>
-    <!-- General logging hierarchy --><!-- Log all info events to file -->
 </configuration>

Modified: qpid/java/trunk/systests/etc/config-systests.json
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/etc/config-systests.json?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/etc/config-systests.json (original)
+++ qpid/java/trunk/systests/etc/config-systests.json Fri Jul  3 06:24:22 2015
@@ -27,27 +27,6 @@
     "path" : "${QPID_HOME}${file.separator}etc${file.separator}passwd"
   } ],
   "brokerloggers" : [ {
-    "name" : "logfile",
-    "type" : "File",
-    "fileName" : "${test.output.dir}${file.separator}TEST-${qpid.testClass}${qpid.testMethod}.txt",
-    "rollDaily" : false,
-    "rollOnRestart" : true,
-    "compressOldFiles" : false,
-    "maxFileSize" : "200mb",
-    "maxHistory" : 1,
-    "safeMode" : true,
-    "brokerloggerfilters" : [ {
-      "name" : "1",
-      "type" : "NameAndLevel",
-      "level" : "INFO",
-      "loggerName" : "" 
-    }, {
-      "name" : "2",
-      "type" : "NameAndLevel",
-      "level" : "DEBUG",
-      "loggerName" : "org.apache.qpid.*" 
-    } ]
-  }, {
     "name" : "memory",
     "type" : "Memory",
     "maxRecords" : 4096,

Modified: qpid/java/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/pom.xml?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/pom.xml (original)
+++ qpid/java/trunk/systests/pom.xml Fri Jul  3 06:24:22 2015
@@ -194,9 +194,6 @@
         <resource>
             <directory>src/main/resources</directory>
         </resource>
-        <resource>
-            <directory>${test.resource.directory}/test-profiles/test_resources</directory>
-        </resource>
     </resources>
   </build>
 

Added: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java?rev=1688958&view=auto
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java (added)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/LogbackSocketPortNumberDefiner.java Fri Jul  3 06:24:22 2015
@@ -0,0 +1,43 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.test.utils;
+
+import ch.qos.logback.core.PropertyDefinerBase;
+
+public class LogbackSocketPortNumberDefiner extends PropertyDefinerBase
+{
+    /**
+     * Port number that will be bound by a Logback Socket Receiver.  This is assigned once per JVM instance.
+     */
+    private static final int LOGBACK_SOCKET_PORT_NUMBER = new PortHelper().getNextAvailable(Integer.getInteger("qpid.logback.receiver.port", 15000));
+
+    public static int getLogbackSocketPortNumber()
+    {
+        return LOGBACK_SOCKET_PORT_NUMBER;
+    }
+
+    @Override
+    public String getPropertyValue()
+    {
+        return String.valueOf(LOGBACK_SOCKET_PORT_NUMBER);
+    }
+}

Modified: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java (original)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java Fri Jul  3 06:24:22 2015
@@ -39,7 +39,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.sift.SiftingAppender;
 import ch.qos.logback.classic.spi.ILoggingEvent;
 import ch.qos.logback.core.Appender;
 import ch.qos.logback.core.FileAppender;
@@ -57,6 +57,10 @@ import org.apache.qpid.server.BrokerOpti
 import org.apache.qpid.server.configuration.BrokerProperties;
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
 import org.apache.qpid.server.configuration.updater.TaskExecutorImpl;
+import org.apache.qpid.server.logging.BrokerLogbackSocketLogger;
+import org.apache.qpid.server.logging.BrokerNameAndLevelFilter;
+import org.apache.qpid.server.model.BrokerLogger;
+import org.apache.qpid.server.model.BrokerLoggerFilter;
 import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.Protocol;
@@ -67,8 +71,10 @@ import org.apache.qpid.server.virtualhos
 import org.apache.qpid.url.URLSyntaxException;
 import org.apache.qpid.util.FileUtils;
 import org.apache.qpid.util.SystemUtils;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
 
 /**
  * Qpid base class for system testing test cases.
@@ -77,6 +83,8 @@ public class QpidBrokerTestCase extends
 {
     private TaskExecutor _taskExecutor;
 
+    public static final int LOGBACK_REMOTE_PORT = LogbackSocketPortNumberDefiner.getLogbackSocketPortNumber();
+
     public static final String GUEST_USERNAME = "guest";
     public static final String GUEST_PASSWORD = "guest";
 
@@ -87,6 +95,7 @@ public class QpidBrokerTestCase extends
 
     protected long RECEIVE_TIMEOUT = Long.getLong("qpid.test_receive_timeout", 1000l);
 
+
     private Map<String, String> _propertiesSetForBroker = new HashMap<String, String>();
 
     private Map<Integer, TestBrokerConfiguration> _brokerConfigurations;
@@ -170,18 +179,29 @@ public class QpidBrokerTestCase extends
 
     public File getOutputFile()
     {
-
-        // get log file from file appender
         final ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+        File appender = getFileFromSiftingAppender(logger);
+
+        return appender;
+    }
+
+    private File getFileFromSiftingAppender(final ch.qos.logback.classic.Logger logger)
+    {
+        String key = MDC.get(QpidTestCase.CLASS_QUALIFIED_TEST_NAME);
+
         for (Iterator<Appender<ILoggingEvent>> index = logger.iteratorForAppenders(); index.hasNext(); /* do nothing */ )
         {
             Appender<ILoggingEvent> appender = index.next();
-            if (appender instanceof FileAppender)
+            if (appender instanceof SiftingAppender)
             {
-                return new File(((FileAppender)appender).getFile());
+                SiftingAppender siftingAppender = (SiftingAppender) appender;
+                Appender subAppender = siftingAppender.getAppenderTracker().find(key);
+                if (subAppender instanceof FileAppender)
+                {
+                    return new File(((FileAppender)subAppender).getFile());
+                }
             }
         }
-
         return null;
     }
 
@@ -255,6 +275,31 @@ public class QpidBrokerTestCase extends
             configuration.setObjectAttribute(Port.class, TestBrokerConfiguration.ENTRY_NAME_RMI_PORT, Port.PORT, getManagementPort(actualPort));
             configuration.setObjectAttribute(Port.class, TestBrokerConfiguration.ENTRY_NAME_JMX_PORT, Port.PORT, getManagementPort(actualPort) + JMXPORT_CONNECTORSERVER_OFFSET);
 
+            String remotelogback = "remotelogback";
+
+            Map<String, String> mdc = new HashMap<>();
+            mdc.put(CLASS_QUALIFIED_TEST_NAME, getClassQualifiedTestName());
+            mdc.put("origin", "B-" + actualPort);
+
+            Map<String, Object> loggerAttrs = new HashMap<>();
+            loggerAttrs.put(BrokerLogger.TYPE, BrokerLogbackSocketLogger.TYPE);
+            loggerAttrs.put(BrokerLogbackSocketLogger.NAME, remotelogback);
+            loggerAttrs.put(BrokerLogbackSocketLogger.PORT, LOGBACK_REMOTE_PORT);
+
+            loggerAttrs.put(BrokerLogbackSocketLogger.MAPPED_DIAGNOSTIC_CONTEXT,
+                            mdc);
+
+            configuration.addObjectConfiguration(BrokerLogger.class, loggerAttrs);
+
+            Map<String, Object> filterAttrs = new HashMap<>();
+            filterAttrs.put(BrokerLoggerFilter.NAME, "1");
+            filterAttrs.put(BrokerLoggerFilter.TYPE, BrokerNameAndLevelFilter.TYPE);
+            filterAttrs.put(BrokerNameAndLevelFilter.LEVEL, "DEBUG");
+            filterAttrs.put(BrokerNameAndLevelFilter.LOGGER_NAME, "org.apache.qpid.*");
+
+            configuration.addObjectConfiguration(BrokerLogger.class,
+                                                 remotelogback, BrokerLoggerFilter.class, filterAttrs);
+
             String workDir = System.getProperty("QPID_WORK") + File.separator + TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST + File.separator + actualPort;
             configuration.setObjectAttribute(VirtualHostNode.class, TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST, JsonVirtualHostNode.STORE_PATH, workDir);
         }
@@ -273,11 +318,6 @@ public class QpidBrokerTestCase extends
         // Initialize this for each test run
         _env = new HashMap<String, String>();
 
-        // Log4j properties expects this to be set
-        System.setProperty("qpid.testMethod", "-" + getName());
-        System.setProperty("qpid.testClass", getClass().getName());
-
-
         try
         {
             super.runBare();
@@ -303,11 +343,6 @@ public class QpidBrokerTestCase extends
 
             _logger.info("==========  stop " + getTestName() + " ==========");
 
-            final ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
-
-            final LoggerContext context = logger.getLoggerContext();
-            context.reset();
-            context.stop();
         }
     }
 
@@ -1245,7 +1280,6 @@ public class QpidBrokerTestCase extends
             jvmOptions.putAll(_propertiesSetForBroker);
 
             copySystemProperty("amqj.protocol.logging.level", jvmOptions);
-            copySystemProperty("root.logging.level", jvmOptions);
 
             copySystemProperty("test.port", jvmOptions);
             copySystemProperty("test.mport", jvmOptions);

Modified: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java (original)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java Fri Jul  3 06:24:22 2015
@@ -115,14 +115,6 @@ public class SpawnedBrokerHolder impleme
         processEnv.put("QPID_PNAME", "-DPNAME=QPBRKR -DTNAME=\"" + _name + "\"");
         processEnv.put("QPID_WORK", qpidWork);
 
-        // Use the environment variable to set amqj.logging.level for the broker
-        // The value used is a 'server' value in the test configuration to
-        // allow a differentiation between the client and broker logging levels.
-        if (System.getProperty("amqj.server.logging.level") != null)
-        {
-            processEnv.put("AMQJ_LOGGING_LEVEL", System.getProperty("amqj.server.logging.level"));
-        }
-
         // Add all the environment settings the test requested
         if (!_environmentSettings.isEmpty())
         {

Added: qpid/java/trunk/systests/src/main/resources/logback-test.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/resources/logback-test.xml?rev=1688958&view=auto
==============================================================================
--- qpid/java/trunk/systests/src/main/resources/logback-test.xml (added)
+++ qpid/java/trunk/systests/src/main/resources/logback-test.xml Fri Jul  3 06:24:22 2015
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~
+  -->
+<configuration debug="true">
+
+    <!-- Logging configuration used for this and other 'systests' modules.  This is named
+         logback-test.xml in order that it is found in preference to the logback.xml
+         found in qpid-test-utils (which is used for other, non-systests, modules).  -->
+
+    <define name="receiverPort" class="org.apache.qpid.test.utils.LogbackSocketPortNumberDefiner"/>
+
+    <appender name="RootSiftAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
+        <discriminator>
+            <Key>classQualifiedTestName</Key>
+            <DefaultValue>testrun</DefaultValue>
+        </discriminator>
+        <sift>
+            <appender name="FILE-${classQualifiedTestName}" class="ch.qos.logback.core.FileAppender">
+                <File>${test.output.dir}${file.separator}TEST-${classQualifiedTestName}.txt</File>
+                <Append>False</Append>
+                <encoder>
+                    <!-- origin identifies the broker, valuable when the test involves multiple brokers -->
+                    <pattern>%date %-7X{origin} %-5level [%thread] %logger{10} %msg%n</pattern>
+                </encoder>
+            </appender>
+        </sift>
+    </appender>
+    <!-- Used to receive the log output from spawned brokers so this log is a consolidated one. -->
+    <receiver class="ch.qos.logback.classic.net.server.ServerSocketReceiver">
+        <port>${receiverPort}</port>
+    </receiver>
+    <logger name="org.apache.qpid" level="debug" />
+    <root level="warn">
+        <appender-ref ref="RootSiftAppender"/>
+    </root>
+</configuration>

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java Fri Jul  3 06:24:22 2015
@@ -71,7 +71,7 @@ public class MultipleBrokersFailoverTest
         super.setUp();
 
         int numBrokers = 4;
-        int port = findFreePort();
+        int port = getPort();
         _brokerPorts = new int[numBrokers];
 
         // we need to create 4 brokers:

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/queue/MultipleTransactedBatchProducerTest.java Fri Jul  3 06:24:22 2015
@@ -53,8 +53,6 @@ public class MultipleTransactedBatchProd
 
     public void setUp() throws Exception
     {
-        //debug level logging often makes this test pass artificially, turn the level down to info.
-        setSystemProperty("amqj.server.logging.level", "INFO");
         _receivedLatch = new CountDownLatch(MESSAGE_COUNT * NUM_PRODUCERS);
 
         getBrokerConfiguration().addJmxManagementConfiguration();

Modified: qpid/java/trunk/test-profiles/JavaExcludes
URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/JavaExcludes?rev=1688958&r1=1688957&r2=1688958&view=diff
==============================================================================
--- qpid/java/trunk/test-profiles/JavaExcludes (original)
+++ qpid/java/trunk/test-profiles/JavaExcludes Fri Jul  3 06:24:22 2015
@@ -37,3 +37,9 @@ org.apache.qpid.util.LogMonitorTest#*
 
 // Test runs for 2 minutes testing that subtraction works
 org.apache.qpid.util.SerialTest#testCorollary1
+
+// Test fails with new logback sift mechanism for producing log per test.  Issue is the RMI
+// threads linger between tests, so still carry the MDC from a previous test run, meaning that
+// the log statements for MNG-1007/8 get directed to the wrong log.  This is not a general
+// problem because other JMX actions are carried out by configuration threads.
+org.apache.qpid.systest.management.jmx.ManagementLoggingTest#testManagementUserOpenClose
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org