Added: qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml URL: http://svn.apache.org/viewvc/qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml?rev=1676797&view=auto ============================================================================== --- qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml (added) +++ qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml Wed Apr 29 17:10:35 2015 @@ -0,0 +1,44 @@ +<?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. +--> +<!-- ===================================================================== --> +<!-- --> +<!-- Log4j configuration for unit tests --> +<!-- --> +<!-- ===================================================================== --> +<configuration scan="true" scanPeriod="10 seconds"> + <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> + <target>System.out</target> + <encoder> + <immediateFlush>true</immediateFlush> + <pattern>%t %d %p [%c{4}] %m%n</pattern> + </encoder> + </appender> + + <logger name="org.apache.qpid" level="${amqj.logging.level}"/> + <logger name="qpid.message" level="INFO"/> + <logger name="qpid.protocol" level="${amqj.protocol.logging.level}"/> + <logger name="org.apache.qpid.test.utils.QpidTestCase" level="ALL"/> + <logger name="org.apache.commons" level="WARN"/> + <logger name="apache.commons.configuration.ConfigurationFactory" level="ERROR"/> + + <root level="${root.logging.level}"> + <appender-ref ref="console"/> + </root> +</configuration>
Propchange: qpid/java/trunk/qpid-test-utils/src/main/resources/logback-test.xml ------------------------------------------------------------------------------ svn:eol-style = native 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=1676797&r1=1676796&r2=1676797&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 Wed Apr 29 17:10:35 2015 @@ -19,13 +19,7 @@ package org.apache.qpid.test.utils; import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import javax.jms.BytesMessage; import javax.jms.Connection; @@ -45,11 +39,13 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import org.apache.log4j.FileAppender; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; -import org.apache.log4j.xml.DOMConfigurator; - +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.joran.JoranConfigurator; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.FileAppender; +import ch.qos.logback.core.joran.spi.JoranException; +import ch.qos.logback.core.util.StatusPrinter; import org.apache.qpid.AMQException; import org.apache.qpid.client.AMQConnectionFactory; import org.apache.qpid.client.AMQConnectionURL; @@ -74,6 +70,8 @@ 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; /** * Qpid base class for system testing test cases. @@ -88,7 +86,7 @@ public class QpidBrokerTestCase extends private final File _configFile = new File(System.getProperty("broker.config")); private File _spawnedBrokerLogConfigFile; protected final String _brokerStoreType = System.getProperty("broker.config-store-type", "JSON"); - protected static final Logger _logger = Logger.getLogger(QpidBrokerTestCase.class); + protected static final Logger _logger = LoggerFactory.getLogger(QpidBrokerTestCase.class); protected static final int LOGMONITOR_TIMEOUT = 5000; protected long RECEIVE_TIMEOUT = Long.getLong("qpid.test_receive_timeout", 1000l); @@ -275,11 +273,32 @@ public class QpidBrokerTestCase extends System.setProperty("qpid.testMethod", "-" + getName()); System.setProperty("qpid.testClass", getClass().getName()); - String log4jConfigFile = System.getProperty("log4j.configuration.file"); - DOMConfigurator.configure(log4jConfigFile); + String logbackConfigFile = System.getProperty("log4j.configuration.file"); + + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + try + { + JoranConfigurator configurator = new JoranConfigurator(); + configurator.setContext(context); + context.reset(); + configurator.doConfigure(logbackConfigFile); + } + catch (JoranException e) + { + StatusPrinter.printInCaseOfErrorsOrWarnings(context); + } // get log file from file appender - _outputFile = new File(((FileAppender)LogManager.getRootLogger().getAllAppenders().nextElement()).getFile()); + ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); + for (Iterator<Appender<ILoggingEvent>> index = logger.iteratorForAppenders(); index.hasNext(); /* do nothing */ ) + { + Appender<ILoggingEvent> appender = index.next(); + if (appender instanceof FileAppender) + { + _outputFile = new File(((FileAppender)appender).getFile()); + break; + } + } try { @@ -296,7 +315,6 @@ public class QpidBrokerTestCase extends // reset properties used in the test revertSystemProperties(); - revertLoggingLevels(); if (_brokerCleanBetweenTests) { @@ -307,7 +325,8 @@ public class QpidBrokerTestCase extends _logger.info("========== stop " + getTestName() + " =========="); - LogManager.resetConfiguration(); + context.reset(); + context.stop(); } } Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/BrokerStartupTest.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/BrokerStartupTest.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/BrokerStartupTest.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/BrokerStartupTest.java Wed Apr 29 17:10:35 2015 @@ -29,8 +29,6 @@ import javax.jms.Queue; import javax.jms.Session; import junit.framework.AssertionFailedError; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; import org.apache.qpid.client.AMQConnectionURL; import org.apache.qpid.server.logging.AbstractTestLogging; @@ -122,10 +120,12 @@ public class BrokerStartupTest extends A // including -Dlog4j.debug so we can validate. setBrokerEnvironment("QPID_OPTS", "-Dlog4j.debug"); +/* // Disable all client logging so we can test for broker DEBUG only. setLoggerLevel(Logger.getRootLogger(), Level.WARN); setLoggerLevel(Logger.getLogger("qpid.protocol"), Level.WARN); setLoggerLevel(Logger.getLogger("org.apache.qpid"), Level.WARN); +*/ // Set the broker to use info level logging, which is the qpid-server // default. Rather than debug which is the test default. Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/BrokerLoggingTest.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/BrokerLoggingTest.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/BrokerLoggingTest.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/BrokerLoggingTest.java Wed Apr 29 17:10:35 2015 @@ -20,23 +20,23 @@ */ package org.apache.qpid.server.logging; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.FileAppender; import junit.framework.AssertionFailedError; -import org.apache.log4j.FileAppender; -import org.apache.log4j.LogManager; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Transport; import org.apache.qpid.test.utils.TestBrokerConfiguration; import org.apache.qpid.transport.ConnectionException; import org.apache.qpid.util.LogMonitor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.net.Socket; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -178,8 +178,18 @@ public class BrokerLoggingTest extends A String TESTID = "BRK-1007"; startBroker(0, false, customLog4j); - _outputFile = new File(((FileAppender) LogManager.getRootLogger().getAllAppenders().nextElement()).getFile()); + // get log file from file appender + ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); + for (Iterator<Appender<ILoggingEvent>> index = logger.iteratorForAppenders(); index.hasNext(); /* do nothing */ ) + { + Appender<ILoggingEvent> appender = index.next(); + if (appender instanceof FileAppender) + { + _outputFile = new File(((FileAppender)appender).getFile()); + break; + } + } // Now we can create the monitor as _outputFile will now be defined _monitor = new LogMonitor(_outputFile); Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/logging/ConsumerLoggingTest.java Wed Apr 29 17:10:35 2015 @@ -32,8 +32,6 @@ import javax.jms.Session; import javax.jms.Topic; import junit.framework.AssertionFailedError; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; import org.apache.qpid.client.AMQConnection; @@ -297,15 +295,6 @@ public class ConsumerLoggingTest extends */ public void testSubscriptionSuspend() throws Exception, IOException { - // Temporary code to better understand a failure in a CI environment. - Logger subscriptionLogger = Logger.getLogger("qpid.message.subscription.state"); - getLogger().debug("Subscription Logger: level " + subscriptionLogger.getLevel() + " effective level " + subscriptionLogger.getEffectiveLevel()); - if (subscriptionLogger.getEffectiveLevel() == Level.OFF) - { - getLogger().debug("Resetting subscription logger level to INFO"); - subscriptionLogger.setLevel(Level.INFO); - } - //Close session with large prefetch _session.close(); Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/jmx/LoggingManagementTest.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/jmx/LoggingManagementTest.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/jmx/LoggingManagementTest.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/jmx/LoggingManagementTest.java Wed Apr 29 17:10:35 2015 @@ -25,8 +25,6 @@ import javax.management.openmbean.Compos import javax.management.openmbean.TabularData; import org.apache.qpid.management.common.mbeans.LoggingManagement; -import org.apache.qpid.server.configuration.BrokerProperties; -import org.apache.qpid.server.logging.log4j.LoggingManagementFacadeTest; import org.apache.qpid.test.utils.JMXTestUtils; import org.apache.qpid.test.utils.QpidBrokerTestCase; import org.apache.qpid.util.FileUtils; @@ -36,8 +34,6 @@ import org.apache.qpid.util.LogMonitor; * System test for Logging Management. <b>These tests rely on value set within * test-profiles/log4j-test.xml</b>. * - * @see LoggingManagementFacadeTest - * */ public class LoggingManagementTest extends QpidBrokerTestCase { Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitor.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitor.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitor.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitor.java Wed Apr 29 17:10:35 2015 @@ -20,9 +20,8 @@ */ package org.apache.qpid.util; -import org.apache.log4j.FileAppender; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.File; @@ -44,14 +43,11 @@ import java.util.Map; */ public class LogMonitor { - private static final Logger _logger = Logger.getLogger(LogMonitor.class); + private static final Logger _logger = LoggerFactory.getLogger(LogMonitor.class); // The file that the log statements will be written to. private final File _logfile; - // The appender we added to the get messages - private final FileAppender _appender; - private int _linesToSkip = 0; /** @@ -82,17 +78,11 @@ public class LogMonitor if (file != null && file.exists()) { _logfile = file; - _appender = null; } else { // This is mostly for running the test outside of the ant setup _logfile = File.createTempFile("LogMonitor", ".log"); - _appender = new FileAppender(new SimpleLayout(), - _logfile.getAbsolutePath()); - _appender.setFile(_logfile.getAbsolutePath()); - _appender.setImmediateFlush(true); - Logger.getRootLogger().addAppender(_appender); } _logger.info("Created LogMonitor. Monitoring file: " + _logfile.getAbsolutePath()); @@ -326,11 +316,6 @@ public class LogMonitor */ public void close() { - //Remove the custom appender we added for this logger - if (_appender != null) - { - Logger.getRootLogger().removeAppender(_appender); - } } } Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitorTest.java URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitorTest.java?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitorTest.java (original) +++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/util/LogMonitorTest.java Wed Apr 29 17:10:35 2015 @@ -21,13 +21,15 @@ package org.apache.qpid.util; import junit.framework.TestCase; -import org.apache.log4j.Logger; +import org.apache.qpid.test.utils.QpidTestCase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.util.List; -public class LogMonitorTest extends TestCase +public class LogMonitorTest extends QpidTestCase { private LogMonitor _monitor; @@ -137,7 +139,7 @@ public class LogMonitorTest extends Test String message = getName() + ": Test Message"; - Logger.getRootLogger().warn(message); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(message); validateLogContainsMessage(_monitor, message); } @@ -151,7 +153,7 @@ public class LogMonitorTest extends Test { String message = getName() + ": Test Message"; - Logger.getRootLogger().warn(message); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(message); String notLogged = "This text was not logged"; @@ -178,7 +180,7 @@ public class LogMonitorTest extends Test public void testDiscardPoint() throws IOException { String firstMessage = getName() + ": Test Message1"; - Logger.getRootLogger().warn(firstMessage); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(firstMessage); validateLogContainsMessage(_monitor, firstMessage); @@ -187,7 +189,7 @@ public class LogMonitorTest extends Test validateLogDoesNotContainMessage(_monitor, firstMessage); String secondMessage = getName() + ": Test Message2"; - Logger.getRootLogger().warn(secondMessage); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(secondMessage); validateLogContainsMessage(_monitor, secondMessage); } @@ -195,7 +197,7 @@ public class LogMonitorTest extends Test { String message = getName() + ": Test Message"; - Logger.getRootLogger().warn(message); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(message); String fileContents = _monitor.readFile(); @@ -266,7 +268,7 @@ public class LogMonitorTest extends Test //ignore } - Logger.getRootLogger().warn(message); + LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME).warn(message); } }).start(); } Added: qpid/java/trunk/systests/src/test/resources/systests.logback.xml URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/resources/systests.logback.xml?rev=1676797&view=auto ============================================================================== --- qpid/java/trunk/systests/src/test/resources/systests.logback.xml (added) +++ qpid/java/trunk/systests/src/test/resources/systests.logback.xml Wed Apr 29 17:10:35 2015 @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + 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> + <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%t %d %p [%c{4}] %m%n</pattern> + </encoder> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>all</level> + </filter> + </appender> + <logger name="org.apache.qpid" additivity="false" level="${amqj.logging.level}"> + <appender-ref ref="console"/> + </logger> + <root level="${root.logging.level}"/> +</configuration> Propchange: qpid/java/trunk/systests/src/test/resources/systests.logback.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: qpid/java/trunk/test-profiles/JavaExcludes URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/JavaExcludes?rev=1676797&r1=1676796&r2=1676797&view=diff ============================================================================== --- qpid/java/trunk/test-profiles/JavaExcludes (original) +++ qpid/java/trunk/test-profiles/JavaExcludes Wed Apr 29 17:10:35 2015 @@ -34,3 +34,10 @@ org.apache.qpid.server.protocol.v0_8.AMQ org.apache.qpid.server.protocol.v0_8.QueueBrowserUsesNoAckTest#* org.apache.qpid.server.protocol.v0_8.MaxChannelsTest#* +// QPID-6516: replace Log4J with LogBack +org.apache.qpid.server.jmx.mbeans.LoggingManagementMBeanTest#* +org.apache.qpid.systest.management.jmx.LoggingManagementTest#* +org.apache.qpid.server.BrokerStartupTest#testInvalidLog4jConfigurationFile +org.apache.qpid.systest.rest.acl.LogViewerACLTest#* +org.apache.qpid.systest.rest.LogRecordsRestTest#* +org.apache.qpid.util.LogMonitorTest#* Added: qpid/java/trunk/test-profiles/test_resources/logback.xml URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/test_resources/logback.xml?rev=1676797&view=auto ============================================================================== --- qpid/java/trunk/test-profiles/test_resources/logback.xml (added) +++ qpid/java/trunk/test-profiles/test_resources/logback.xml Wed Apr 29 17:10:35 2015 @@ -0,0 +1,37 @@ +<?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 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"/> + + <root level="debug"> + <appender-ref ref="TestAppender"/> + </root> + <!-- General logging hierarchy --><!-- Log all info events to file --> +</configuration> Propchange: qpid/java/trunk/test-profiles/test_resources/logback.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: qpid/java/trunk/test-profiles/test_resources/logback2.xml URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/test_resources/logback2.xml?rev=1676797&view=auto ============================================================================== --- qpid/java/trunk/test-profiles/test_resources/logback2.xml (added) +++ qpid/java/trunk/test-profiles/test_resources/logback2.xml Wed Apr 29 17:10:35 2015 @@ -0,0 +1,37 @@ +<?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 scan="true" scanPeriod="10 seconds"> + <appender name="TestAppender" class="ch.qos.logback.core.FileAppender"> + <file>/home/lorenz/${test.output.dir}_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"/> + + <root level="debug"> + <appender-ref ref="TestAppender"/> + </root> + <!-- General logging hierarchy --><!-- Log all info events to file --> +</configuration> Propchange: qpid/java/trunk/test-profiles/test_resources/logback2.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: qpid/java/trunk/test-profiles/test_resources/spawned-broker-logback.xml URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/test_resources/spawned-broker-logback.xml?rev=1676797&view=auto ============================================================================== --- qpid/java/trunk/test-profiles/test_resources/spawned-broker-logback.xml (added) +++ qpid/java/trunk/test-profiles/test_resources/spawned-broker-logback.xml Wed Apr 29 17:10:35 2015 @@ -0,0 +1,41 @@ +<?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. +--> +<!-- ===================================================================== --> +<!-- --> +<!-- Log4j configuration for unit tests --> +<!-- --> +<!-- ===================================================================== --> +<configuration scan="true" scanPeriod="10 seconds"> + <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> + <target>System.out</target> + <encoder> + <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"/> + <logger name="qpid.protocol" level="${amqj.protocol.logging.level}"/> + <logger name="org.apache.commons" level="WARN"/> + + <root level="${root.logging.level}"> + <appender-ref ref="console"/> + </root> +</configuration> Propchange: qpid/java/trunk/test-profiles/test_resources/spawned-broker-logback.xml ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org