Skip to content

Commit

Permalink
AMQP-530: Log4j 1.x Deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell authored and artembilan committed Sep 1, 2015
1 parent 031fb9f commit 8bf6197
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ subprojects { subproject ->
rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '3.5.4'
rabbitmqHttpClientVersion = '1.0.0.RELEASE'

springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.1.7.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.2.1.RELEASE'

springRetryVersion = '1.1.2.RELEASE'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Log4jConfigurer;

/**
* @author Jon Brisbin <jbrisbin@vmware.com>
Expand All @@ -67,9 +66,10 @@ public class AmqpAppenderIntegrationTests {

private SimpleMessageListenerContainer listenerContainer;

@SuppressWarnings("deprecation") // SF 4.2.1
@Before
public void setUp() throws Exception {
Log4jConfigurer.initLogging("classpath:log4j-amqp.properties");
org.springframework.util.Log4jConfigurer.initLogging("classpath:log4j-amqp.properties");
log = Logger.getLogger(getClass());
listenerContainer = applicationContext.getBean(SimpleMessageListenerContainer.class);
}
Expand All @@ -79,9 +79,10 @@ public void tearDown() {
listenerContainer.shutdown();
}

@SuppressWarnings("deprecation") // SF 4.2.1
@AfterClass
public static void reset() throws Exception {
Log4jConfigurer.initLogging("classpath:log4j.properties");
org.springframework.util.Log4jConfigurer.initLogging("classpath:log4j.properties");
}

@Test
Expand Down Expand Up @@ -169,12 +170,13 @@ public void testIgnoresThrowableWithCustomLayout() throws Exception {
/*
* When running as main(); should shutdown cleanly.
*/
@SuppressWarnings("deprecation") // SF 4.2.1
public static void main(String[] args) throws Exception {
Log4jConfigurer.initLogging("classpath:log4j-amqp.properties");
org.springframework.util.Log4jConfigurer.initLogging("classpath:log4j-amqp.properties");
Log logger = LogFactory.getLog(AmqpAppenderIntegrationTests.class);
logger.info("foo");
Thread.sleep(1000);
Log4jConfigurer.shutdownLogging();
org.springframework.util.Log4jConfigurer.shutdownLogging();
}

public static class EnhancedAppender extends AmqpAppender {
Expand Down
3 changes: 3 additions & 0 deletions src/reference/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include::preface.adoc[]
This first part of the reference documentation is a high-level overview of Spring AMQP and the underlying concepts and some code snippets that will get you up and running as quickly as possible.

include::quick-tour.adoc[]

include::whats-new.adoc[]

== Reference
Expand All @@ -22,13 +23,15 @@ The <<amqp,main chapter>> covers the core classes to develop an AMQP application
This part also includes a chapter about the <<sample-apps,sample applications>>.

include::amqp.adoc[]

include::sample-apps.adoc[]

== Spring Integration - Reference

This part of the reference documentation provides a quick introduction to the AMQP support within the Spring Integration project.

include::si-amqp.adoc[]

[[resources]]

== Other Resources
Expand Down
6 changes: 3 additions & 3 deletions src/reference/asciidoc/quick-tour.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ compile 'org.springframework.amqp:spring-rabbit:{spring-amqp-version}'
[[compatibility]]
===== Compatibility

While the default Spring Framework version dependency is 4.1.x, Spring AMQP is generally compatible with earlier versions of Spring Framework.
Annotation-based listeners and the `RabbitMessagingTemplate` require Spring Framework 4.1, however.
While the default Spring Framework version dependency is 4.2.x, Spring AMQP is generally compatible with earlier versions of Spring Framework.
Annotation-based listeners and the `RabbitMessagingTemplate` require Spring Framework 4.1 or higher, however.

Similarly, the default `amqp-client` version is 3.4.x but the framework is generally compatible with earlier versions.
Similarly, the default `amqp-client` version is 3.5.x but the framework is generally compatible with earlier versions.
However, of course, features that rely on newer client versions will not be available.

===== Very, Very Quick
Expand Down

0 comments on commit 8bf6197

Please sign in to comment.